fix ui server log monitor

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-05-18 18:29:38 +02:00
parent b2223c7f8c
commit fdda09c7e5
3 changed files with 7 additions and 5 deletions
+2 -1
View File
@@ -23,6 +23,7 @@ function htmlEscape(text) {
async function logMonitor() {
const addLogLine = (line) => {
if (!logMonitorEl) logMonitorEl = document.getElementById('logMonitorData');
try {
const l = JSON.parse(line.replaceAll('\n', ' ').replaceAll('\\', '\\\\'));
const row = document.createElement('tr');
@@ -128,6 +129,6 @@ async function initLogMonitor() {
authFetch(`${window.api}/start?agent=${encodeURI(navigator.userAgent)}`);
logMonitor();
const t1 = performance.now();
log('initLogMonitor', Math.round(t1 - t0));
log('initLogMonitor', { show: opts.logmonitor_show, time: Math.round(t1 - t0) });
timer('initLogMonitor', t1 - t0);
}