(feature) Add staff-only Django dashboard views

Add a small template-based UI for inspecting pobsync state through Django. The
dashboard shows host, schedule, snapshot, and backup run summaries, while host
detail pages show config, schedule, recent runs, and discovered snapshots.

Keep the views read-only and staff-protected, document the new dashboard URL,
and cover the routes with focused view tests.
This commit is contained in:
2026-05-19 11:53:32 +02:00
parent 2778a589ea
commit b0c6afad09
7 changed files with 424 additions and 1 deletions

View File

@@ -33,6 +33,7 @@ python3 manage.py runserver
The admin is available at:
- http://127.0.0.1:8000/
- http://127.0.0.1:8000/admin/
Staff-only JSON endpoints are available at:
@@ -116,6 +117,7 @@ docker compose up --build web
This starts Django on:
- http://127.0.0.1:8010/
- http://127.0.0.1:8010/admin/
- http://127.0.0.1:8010/api/
- http://127.0.0.1:8010/api/status/
@@ -150,6 +152,7 @@ base record when it is known.
The Django retention command plans from `SnapshotRecord` instead of rediscovering snapshots from the filesystem.
Post-backup pruning from Django also uses the SQL retention service after the completed snapshot is recorded.
Staff-only JSON endpoints expose service status, hosts, snapshots, and backup runs for lightweight inspection.
Staff-only dashboard views expose the same operational state through Django templates.
The remaining internal engine code still contains reusable backup primitives: