update regex filter
This commit is contained in:
30
index.html
30
index.html
@@ -808,7 +808,8 @@
|
|||||||
<!-- Empty state / Table area -->
|
<!-- Empty state / Table area -->
|
||||||
<div id="empty-state">
|
<div id="empty-state">
|
||||||
<svg width="48" height="48" viewBox="0 0 48 48" fill="none">
|
<svg width="48" height="48" viewBox="0 0 48 48" fill="none">
|
||||||
<rect x="6" y="6" width="36" height="36" rx="6" stroke="currentColor" stroke-width="1.5" stroke-dasharray="5 3" />
|
<rect x="6" y="6" width="36" height="36" rx="6" stroke="currentColor" stroke-width="1.5"
|
||||||
|
stroke-dasharray="5 3" />
|
||||||
<path d="M16 20h16M16 24h10M16 28h12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
|
<path d="M16 20h16M16 24h10M16 28h12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
|
||||||
</svg>
|
</svg>
|
||||||
<div class="es-title">No log file loaded</div>
|
<div class="es-title">No log file loaded</div>
|
||||||
@@ -1185,12 +1186,13 @@
|
|||||||
filteredLogs = allLogs.filter(log => {
|
filteredLogs = allLogs.filter(log => {
|
||||||
if (levelFilter && log.level !== levelFilter) return false;
|
if (levelFilter && log.level !== levelFilter) return false;
|
||||||
if (timeFilter && (log.time.getTime() < timeFilter.start || log.time.getTime() > timeFilter.end)) return false;
|
if (timeFilter && (log.time.getTime() < timeFilter.start || log.time.getTime() > timeFilter.end)) return false;
|
||||||
if (regex && !regex.test(log.message)) return false;
|
if (regex && !regex.test(log.message) && !regex.test(log.props) && !regex.test(log.exception)) return false;
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
renderTable();
|
renderTable();
|
||||||
updateStatus();
|
updateStatus();
|
||||||
|
updateFilteredLevelCounts();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---- Table rendering ----
|
// ---- Table rendering ----
|
||||||
@@ -1497,18 +1499,18 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
window.copySection = function (btn, text) {
|
window.copySection = function (btn, text) {
|
||||||
navigator.clipboard.writeText(text).then(() => {
|
navigator.clipboard.writeText(text).then(() => {
|
||||||
const orig = btn.textContent;
|
const orig = btn.textContent;
|
||||||
btn.textContent = 'copied ✓';
|
btn.textContent = 'copied ✓';
|
||||||
btn.style.color = 'var(--info)';
|
btn.style.color = 'var(--info)';
|
||||||
btn.style.borderColor = 'var(--info)';
|
btn.style.borderColor = 'var(--info)';
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
btn.textContent = orig;
|
btn.textContent = orig;
|
||||||
btn.style.color = 'var(--text3)';
|
btn.style.color = 'var(--text3)';
|
||||||
btn.style.borderColor = 'var(--border2)';
|
btn.style.borderColor = 'var(--border2)';
|
||||||
}, 1500);
|
}, 1500);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// Load demo on start
|
// Load demo on start
|
||||||
//loadDemo();
|
//loadDemo();
|
||||||
|
|||||||
Reference in New Issue
Block a user