v0.81.0: retire drive-activation banner; add standalone "Kiszolgáló újraindítása" button
In the intermediary-mount model an enrolled drive binds live into the running guest (no reboot), so the "… meghajtó aktiválásra vár / Újraindítás most" banner was an obsolete relic — also dead since v0.78 (pendingActivationDrives keyed on the raw MountPath vs the now-stable sp.Path). Removed the banner block + activatePendingDrives JS (settings.html), the PendingDrives feed (handlers.go), and the dead pendingActivationDrives helper + its unused internal/system import. Renamed handleStorageActivate -> HandleServerReboot (split out a testable serverReboot core), removed the /api/storage/activate case, and mounted the handler at the new non-storage route /api/server/reboot (RequireAuth+CsrfProtect). The agent GuestReboot primitive is reused unchanged. Added the standalone "Kiszolgáló újraindítása" settings card (sibling to the controller-only "Vezérlő újraindítása"), reusing the pollRestart() loop. Test: TestHandleServerReboot_CallsGuestReboot (fake diskAgent asserts GuestReboot invoked once + 202). diskAgent/mockAgent gained GuestReboot. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017PsnU2ASocYrvzqE82YDYW
This commit is contained in:
@@ -726,6 +726,9 @@ func main() {
|
||||
mux.Handle("/api/disks/", webServer.RequireAuth(webServer.CsrfProtect(http.HandlerFunc(webServer.ServeDiskAPI))))
|
||||
// Guided storage provisioning (init/attach/eject orchestration over the agent disk API + registry).
|
||||
mux.Handle("/api/storage/", webServer.RequireAuth(webServer.CsrfProtect(http.HandlerFunc(webServer.ServeStorageAPI))))
|
||||
// Standalone full-server (guest) restart — the "Kiszolgáló újraindítása" maintenance affordance,
|
||||
// a sibling to the controller-only /api/selfrestart. Reuses the agent GuestReboot primitive.
|
||||
mux.Handle("/api/server/reboot", webServer.RequireAuth(webServer.CsrfProtect(http.HandlerFunc(webServer.HandleServerReboot))))
|
||||
// Whole-guest (appliance) backup visibility + manual trigger. Distinct prefix from apiRouter's
|
||||
// app-data /api/backup/{run,status} (DB dumps) to avoid shadowing the /api/ catch-all subtree.
|
||||
mux.Handle("/api/guest-backup/", webServer.RequireAuth(webServer.CsrfProtect(http.HandlerFunc(webServer.ServeBackupAPI))))
|
||||
|
||||
Reference in New Issue
Block a user