(feature) Add read-only retention plan view

Add a staff-only retention plan page for each host using the SQL-backed
retention service. Link it from the host detail page and show policy settings,
keep reasons, and snapshots that would be deleted for scheduled, manual, or all
snapshot kinds.

Keep the flow non-destructive for now, validate query parameters, and cover the
view with tests for rendering, base protection, and invalid kind handling.
This commit is contained in:
2026-05-19 12:00:19 +02:00
parent 3f3bdf2d45
commit 123583a502
7 changed files with 165 additions and 2 deletions

View File

@@ -154,6 +154,7 @@ Post-backup pruning from Django also uses the SQL retention service after the co
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.
Host pages include a safe snapshot discovery action that records existing snapshots into SQL.
Host pages also include a read-only SQL retention plan view before any destructive pruning action.
The remaining internal engine code still contains reusable backup primitives: