(feature) Add snapshot discovery action to host view

Add a staff-only POST action on host detail pages to discover existing snapshots
for that host and record them into SQL. Show success or failure feedback through
Django messages, and keep the action non-destructive before adding heavier
backup or retention controls.

Cover the action with view tests for successful discovery, redirect behavior,
and method safety.
This commit is contained in:
2026-05-19 11:56:45 +02:00
parent b0c6afad09
commit 3f3bdf2d45
6 changed files with 91 additions and 2 deletions

View File

@@ -153,6 +153,7 @@ The Django retention command plans from `SnapshotRecord` instead of rediscoverin
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.
Host pages include a safe snapshot discovery action that records existing snapshots into SQL.
The remaining internal engine code still contains reusable backup primitives: