feat: owner review 2 phase 2: scheduled jobs and log settings (#10)
CI / Build and test (push) Successful in 7m0s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 6s
Release / Build, test and publish (push) Successful in 13m28s
CI / PostgreSQL 16 integration (push) Successful in 5m52s
CI / PostgreSQL 17 integration (push) Successful in 4m50s
CI / Docker image (push) Successful in 1m4s
Release / Server image (push) Successful in 1m35s

- Jobs > Scheduled on the desktop and the admin panel. Every timer that queued work is now a visible system schedule: archive scan, upload clean-up, index backup, job-history and audit clean-ups, desktop housekeeping. New actions: verify, thumbnails, proxies, analysis, maintenance, backup, clean-ups, reports.
- The scheduler: migration 0007, in-house recurrence, compare-and-set claim, catch-up, scan at start.
- Log settings: levels, retention, size parts, total limit, daily or hourly rotation, audit retention, diagnostics share; the server writes Debug/Trace to its files again; logging never fails a job.

Upgrade: CHRONOS_LOG_LEVEL set in an existing container locks both levels; migration 0007 is one-way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #10.
This commit is contained in:
Alby96andClaude Opus 5.5 authored and Alby96 committed 2026-10-27 11:19:26 +01:00
1 parent 1f089888e8
commit af9eeaab9b
349 files changed
+28341 -1304

No files matched your search

+36 -1
View File
@@ -1,8 +1,12 @@
// Audit entries as the dashboard and the Logs page show them: server codes (actions, job kinds, roles, changed
// fields) in words; names, titles and templates stay as recorded.
// fields, schedule recurrences) in words, system schedules by their names in the panel's language; other names, titles
// and templates stay as recorded.
import { t, has, plural } from "./i18n.js";
import { formatBytes } from "./ui.js";
import { kindLabel, pascal } from "./jobs.js";
import { actionLabel as scheduleAction, outcomeLabel, scheduleName, recurrenceText, parseRecurrence } from "./schedules.js";
const SYSTEM = "system:";
export function actionLabel(action) {
const key = `Admin.Logs.Action.${pascal(action)}`;
@@ -35,6 +39,28 @@ export function detailText(entry) {
case "user_updated":
case "sequence_updated":
return details.split(", ").map(changeLabel).join(", ");
case "schedule_run": {
// "[system:<key> · ]name · outcome"
const parts = details.split(" · ");
if (parts.length < 2) return details;
const outcome = parts.pop();
return `${scheduleNameIn(parts)} · ${outcomeLabel(outcome)}`;
}
case "schedule_created":
case "schedule_updated":
case "schedule_deleted":
case "schedule_reset": {
// "[system:<key> · ]name · action · recurrence[ · off]", read from the end: a name may hold the separator.
const parts = details.split(" · ");
const off = parts.at(-1) === "off";
if (off) parts.pop();
if (parts.length < 3) return details;
const code = parts.pop();
const action = parts.pop();
const recurrence = parseRecurrence(code);
const shown = [scheduleNameIn(parts), scheduleAction(action), recurrence ? recurrenceText(recurrence) : code];
return (off ? [...shown, t("Admin.Schedules.Off")] : shown).join(" · ");
}
default:
return details;
}
@@ -53,6 +79,15 @@ function changeLabel(change) {
return has(key) ? t(key) : change;
}
/**
* A schedule's name from the leading parts of audit details: after "system:<key>" a system schedule's in the panel's
* language, as the Scheduled tab names it; else (a user's, or one recorded before keys were) as recorded.
*/
function scheduleNameIn(parts) {
const systemKey = parts.length > 1 && parts[0].startsWith(SYSTEM) ? parts[0].slice(SYSTEM.length) : null;
return scheduleName({ systemKey, name: (systemKey ? parts.slice(1) : parts).join(" · ") });
}
function splitLast(details) {
const at = details.lastIndexOf(" · ");
return at < 0 ? [details] : [details.slice(0, at), details.slice(at + 3)];