update regex filter
This commit is contained in:
30
index.html
30
index.html
@@ -808,7 +808,8 @@
|
||||
<!-- Empty state / Table area -->
|
||||
<div id="empty-state">
|
||||
<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" />
|
||||
</svg>
|
||||
<div class="es-title">No log file loaded</div>
|
||||
@@ -1185,12 +1186,13 @@
|
||||
filteredLogs = allLogs.filter(log => {
|
||||
if (levelFilter && log.level !== levelFilter) 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;
|
||||
});
|
||||
|
||||
renderTable();
|
||||
updateStatus();
|
||||
updateFilteredLevelCounts();
|
||||
}
|
||||
|
||||
// ---- Table rendering ----
|
||||
@@ -1497,18 +1499,18 @@
|
||||
});
|
||||
|
||||
window.copySection = function (btn, text) {
|
||||
navigator.clipboard.writeText(text).then(() => {
|
||||
const orig = btn.textContent;
|
||||
btn.textContent = 'copied ✓';
|
||||
btn.style.color = 'var(--info)';
|
||||
btn.style.borderColor = 'var(--info)';
|
||||
setTimeout(() => {
|
||||
btn.textContent = orig;
|
||||
btn.style.color = 'var(--text3)';
|
||||
btn.style.borderColor = 'var(--border2)';
|
||||
}, 1500);
|
||||
});
|
||||
};
|
||||
navigator.clipboard.writeText(text).then(() => {
|
||||
const orig = btn.textContent;
|
||||
btn.textContent = 'copied ✓';
|
||||
btn.style.color = 'var(--info)';
|
||||
btn.style.borderColor = 'var(--info)';
|
||||
setTimeout(() => {
|
||||
btn.textContent = orig;
|
||||
btn.style.color = 'var(--text3)';
|
||||
btn.style.borderColor = 'var(--border2)';
|
||||
}, 1500);
|
||||
});
|
||||
};
|
||||
|
||||
// Load demo on start
|
||||
//loadDemo();
|
||||
|
||||
Reference in New Issue
Block a user