feat(diagnostics): the admin log console

Admin → Diagnostics reads the server's stored log: one list, newest first,
where a line opens in place to its full record (time, source and logger,
account, request and job ids, version, message, attributes, stack). A
request or job id narrows the list to that request or job with every other
filter off, shown as a removable chip. Filters: level group, source,
account, event, period and a free-text search; all of them live in the URL
(`l*` keys, which setPage clears like the Plex and Channels keys), so a
filtered view is a link and Back restores it. "Live" re-reads the newest
page every few seconds while the tab is visible; paging into older rows
turns it off. Copy puts the loaded lines on the clipboard as JSON lines.

The facet counts now honour every filter but their own, as the feed's do:
a request pivot narrows them, and a picked level does not zero its
siblings. A value in use stays offered even when the counts drop it.

"Saját napló" and the console draw a line with one shared component,
`LogLine`, whose phone layout gives the message its own full-width line
(sharing the code's line left it a few characters). The level groups
moved to lib/log.ts for both.

The console's own reads are logged at DEBUG on success, like the
healthcheck: at INFO its live tail filled the log with itself.
This commit is contained in:
2026-09-19 01:54:48 +02:00
parent 5e208353e3
commit b5996a0e56
23 changed files with 1127 additions and 117 deletions
@@ -0,0 +1,40 @@
{
"title": "Server log",
"intro": "The server's stored log — lines from the API, the downloader and browsers, kept until the retention period ends. A line opens in place; click its request or job id to keep only that request's or job's lines.",
"search": "Search the message, code, stack…",
"levelLabel": "Filter by level",
"source": "Source",
"account": "Account",
"event": "Event",
"window": "Period",
"windows": {
"1h": "1 hour",
"24h": "24 hours",
"7d": "7 days"
},
"any": "Any",
"noAccount": "No account",
"noEvent": "No code",
"live": "Live",
"copy": "Copy",
"copied_one": "Copied {{count}} line",
"copied_other": "Copied {{count}} lines",
"copyFailed": "Couldn't copy to the clipboard",
"pivotRequest": "request {{id}}",
"pivotJob": "job {{id}}",
"clearPivot": "Clear filter",
"showRequest": "Only this request's lines",
"showJob": "Only this job's lines",
"empty": "No lines match the filters.",
"count_one": "{{count}} line loaded · newest first",
"count_other": "{{count}} lines loaded · newest first",
"older": "Load older",
"fields": {
"when": "Time",
"source": "Source",
"account": "Account",
"request": "Request",
"job": "Job",
"version": "Version"
}
}
+1
View File
@@ -35,6 +35,7 @@
"addAccount": "Add another account",
"switchTo": "Switch to {{name}}",
"audit": "Audit log",
"logs": "Diagnostics",
"googleAddress": "Google account: {{email}}"
},
"sync": {
@@ -0,0 +1,40 @@
{
"title": "Szervernapló",
"intro": "A szerver tárolt naplója — az API, a letöltő és a böngészők sorai, amelyeket a megőrzési idő végéig tart meg. Egy sor a helyén nyílik ki; a kérés- vagy job-azonosítójára kattintva csak az ahhoz tartozó sorok maradnak.",
"search": "Keresés az üzenetben, a kódban, a hívási veremben…",
"levelLabel": "Szűrés szintre",
"source": "Forrás",
"account": "Fiók",
"event": "Esemény",
"window": "Időszak",
"windows": {
"1h": "1 óra",
"24h": "24 óra",
"7d": "7 nap"
},
"any": "Bármi",
"noAccount": "Fiók nélkül",
"noEvent": "Kód nélkül",
"live": "Élő",
"copy": "Másolás",
"copied_one": "Kimásolva: {{count}} sor",
"copied_other": "Kimásolva: {{count}} sor",
"copyFailed": "Nem sikerült a vágólapra másolni",
"pivotRequest": "kérés {{id}}",
"pivotJob": "job {{id}}",
"clearPivot": "Szűrő törlése",
"showRequest": "Csak ennek a kérésnek a sorai",
"showJob": "Csak ennek a jobnak a sorai",
"empty": "Nincs a szűrésnek megfelelő sor.",
"count_one": "{{count}} sor betöltve · a legújabb felül",
"count_other": "{{count}} sor betöltve · a legújabb felül",
"older": "Régebbiek betöltése",
"fields": {
"when": "Időpont",
"source": "Forrás",
"account": "Fiók",
"request": "Kérés",
"job": "Job",
"version": "Verzió"
}
}
+1
View File
@@ -35,6 +35,7 @@
"addAccount": "Másik fiók hozzáadása",
"switchTo": "Váltás erre: {{name}}",
"audit": "Auditnapló",
"logs": "Diagnosztika",
"googleAddress": "Google-fiók: {{email}}"
},
"sync": {