From d2ff4a2e02f1175ace2d4fd571948638b483c50a Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Mon, 16 Feb 2026 09:09:50 +0100 Subject: [PATCH] Fix log endpoint and reformat --- web/frontend/src/Logs.root.svelte | 40 +++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/web/frontend/src/Logs.root.svelte b/web/frontend/src/Logs.root.svelte index 3f23b297..ccadabce 100644 --- a/web/frontend/src/Logs.root.svelte +++ b/web/frontend/src/Logs.root.svelte @@ -68,7 +68,16 @@ } function levelName(priority) { - const names = ["EMERG", "ALERT", "CRIT", "ERR", "WARN", "NOTICE", "INFO", "DEBUG"]; + const names = [ + "EMERG", + "ALERT", + "CRIT", + "ERR", + "WARN", + "NOTICE", + "INFO", + "DEBUG", + ]; return names[priority] || "UNKNOWN"; } @@ -89,7 +98,7 @@ if (level) params.set("level", level); if (search.trim()) params.set("search", search.trim()); - const resp = await fetch(`/config/logs/?${params.toString()}`); + const resp = await fetch(`/frontend/logs/?${params.toString()}`); if (!resp.ok) { const body = await resp.json(); throw new Error(body.error || `HTTP ${resp.status}`); @@ -167,11 +176,18 @@ type="text" placeholder="Search..." bind:value={search} - onkeydown={(e) => { if (e.key === "Enter") fetchLogs(); }} + onkeydown={(e) => { + if (e.key === "Enter") fetchLogs(); + }} /> -