B1: migrate UI wiring — /api/storage/migrate{,-app,/status} + settings & app pages

ServeStorageAPI gains POST /api/storage/migrate (whole-namespace), POST
/api/storage/migrate-app (single app), GET /api/storage/migrate/status (poll).
settings.html: the greyed migrate-all span becomes a real target-select + button +
shared progress panel; app_info.html gains a per-app 'Áthelyezés másik tárhelyre'
control. Both poll the shared status endpoint and render Hungarian phase progress.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-14 19:48:22 +02:00
parent b57150e3ab
commit 16a4c3e878
4 changed files with 167 additions and 1 deletions
+17
View File
@@ -471,6 +471,23 @@ func (s *Server) appDetailHandler(w http.ResponseWriter, r *http.Request, slug s
data["HasAppInfo"] = found.Meta.HasAppInfo()
data["EffectiveSubdomain"] = effectiveSubdomain
// Per-app migration (B1): offer to move this app's data to another connected drive (≠ current).
if found.Deployed {
current := ""
if appCfg := s.stackMgr.LoadAppConfigByName(found.Name); appCfg != nil {
current = appCfg.Env["HDD_PATH"]
}
var targets []settings.StoragePath
for _, sp := range s.settings.GetStoragePaths() {
if sp.Path == current || sp.Decommissioned || sp.Disconnected || !sp.Schedulable {
continue
}
targets = append(targets, sp)
}
data["MigrateTargets"] = targets
data["MigrateCurrent"] = current
}
s.executeTemplate(w, r, "app_info", data)
}