Add backend API, running status and 30-day run history

- FastAPI + SQLite backend: tenants, jobs and runs, with an idempotent
  /api/v1/ingest endpoint authenticated by per-collector API keys
- Runs store started_at and finished_at; "Last Run" is the most recent
  finish, and in-progress runs show as Running
- Job modal shows a 30-day daily strip, success rate, and a filterable
  run list with per-run messages
- nginx: HTTPS plus basic auth, ingest endpoint exempt; systemd unit
- manage.py for API keys, job cleanup and demo data; pytest suite

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-04 21:53:24 -06:00
co-authored by Claude Opus 5.5
parent 44e3065efa
commit bf752a904f
25 changed files with 2148 additions and 1 deletions
+15
View File
@@ -0,0 +1,15 @@
// Central runtime config. Kept as a static file so ops can change it without a build.
const params = new URLSearchParams(window.location.search);
export const CONFIG = Object.freeze({
apiBaseUrl: '/api/v1',
refreshIntervalMs: 60_000,
requestTimeoutMs: 15_000,
// A job whose next scheduled run is this far in the past is flagged "Overdue".
// Catches the silent failure mode: a job stops reporting and stays green forever.
overdueGraceMinutes: 30,
// Run history shown in the job modal (the API caps this at 30)
historyDays: 30,
// ?mock=1 → use in-browser sample data, no backend needed
useMock: params.has('mock'),
});