mirror of
https://github.com/vladmandic/automatic
synced 2026-09-13 10:08:43 +02:00
minor fixes
This commit is contained in:
@@ -15,14 +15,16 @@ async function logMonitor() {
|
||||
logMonitorEl.parentElement.style.display = 'block';
|
||||
const lines = await res.json();
|
||||
for (const line of lines) {
|
||||
const l = JSON.parse(line);
|
||||
const row = document.createElement("tr");
|
||||
row.style = 'padding: 10px; margin: 0;';
|
||||
row.innerHTML = `<td>${new Date(1000 * l.created).toISOString()}</td><td>${l.level}</td><td>${l.facility}</td><td>${l.module}</td><td>${l.msg}</td>`;
|
||||
logMonitorEl.appendChild(row);
|
||||
while (logMonitorEl.childElementCount > 100) logMonitorEl.removeChild(logMonitorEl.firstChild);
|
||||
logMonitorEl.scrollTop = logMonitorEl.scrollHeight
|
||||
try {
|
||||
const l = JSON.parse(line);
|
||||
const row = document.createElement("tr");
|
||||
row.style = 'padding: 10px; margin: 0;';
|
||||
row.innerHTML = `<td>${new Date(1000 * l.created).toISOString()}</td><td>${l.level}</td><td>${l.facility}</td><td>${l.module}</td><td>${l.msg}</td>`;
|
||||
logMonitorEl.appendChild(row);
|
||||
} catch {}
|
||||
}
|
||||
while (logMonitorEl.childElementCount > 100) logMonitorEl.removeChild(logMonitorEl.firstChild);
|
||||
logMonitorEl.scrollTop = logMonitorEl.scrollHeight
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
window.opts = {};
|
||||
window.localization = {};
|
||||
window.titles = {};
|
||||
let tabSelected = '';
|
||||
|
||||
function set_theme(theme) {
|
||||
|
||||
Reference in New Issue
Block a user