(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:
@@ -9,6 +9,7 @@ from pobsync_backend import api, views
|
||||
urlpatterns = [
|
||||
path("", views.dashboard, name="dashboard"),
|
||||
path("hosts/<str:host>/", views.host_detail, name="host_detail"),
|
||||
path("hosts/<str:host>/discover-snapshots/", views.discover_host_snapshots, name="discover_host_snapshots"),
|
||||
path("api/", api.api_index),
|
||||
path("api/status/", api.status),
|
||||
path("api/hosts/", api.hosts),
|
||||
|
||||
Reference in New Issue
Block a user