diff --git a/controller/cmd/controller/main.go b/controller/cmd/controller/main.go index 92c8bb3..430c6ba 100644 --- a/controller/cmd/controller/main.go +++ b/controller/cmd/controller/main.go @@ -102,8 +102,8 @@ func main() { if metricsStore != nil { defer metricsStore.Close() metricsHDDPath := cfg.Paths.HDDPath - if paths := sett.GetStoragePaths(); len(paths) > 0 { - metricsHDDPath = paths[0].Path + if p := sett.GetDefaultStoragePath(); p != "" { + metricsHDDPath = p } metricsCollector := metrics.NewMetricsCollector(metricsStore, cpuCollector, metricsHDDPath, logger) metricsCollector.Start(ctx) diff --git a/controller/internal/web/handlers.go b/controller/internal/web/handlers.go index 55d5e90..fe5a049 100644 --- a/controller/internal/web/handlers.go +++ b/controller/internal/web/handlers.go @@ -654,9 +654,17 @@ func (s *Server) buildAppBackupRows( } } } else { - // No HDD data — fully automatic - row.Status = "auto" - row.StatusText = "Automatikus mentés (nincs felhasználói adat)" + // No HDD data — everything backed up automatically via restic + if volumeLastStatus == "ok" { + row.Status = "green" + row.StatusText = "Mentés rendben" + } else if volumeLastStatus == "error" { + row.Status = "yellow" + row.StatusText = "Kötetek mentése sikertelen" + } else { + row.Status = "auto" + row.StatusText = "Automatikus mentés" + } } // If DB dump failed for this app, degrade to yellow (if not already red) diff --git a/controller/internal/web/server.go b/controller/internal/web/server.go index 2fb404d..98a8537 100644 --- a/controller/internal/web/server.go +++ b/controller/internal/web/server.go @@ -150,10 +150,10 @@ func (s *Server) ServeStorageAPI(w http.ResponseWriter, r *http.Request) { s.storageAPIHandler(w, r) } -// primaryHDDPath returns the first registered storage path, or the legacy config value. +// primaryHDDPath returns the default storage path, or the legacy config value. func (s *Server) primaryHDDPath() string { - if paths := s.settings.GetStoragePaths(); len(paths) > 0 { - return paths[0].Path + if p := s.settings.GetDefaultStoragePath(); p != "" { + return p } return s.cfg.Paths.HDDPath } diff --git a/controller/internal/web/templates/layout.html b/controller/internal/web/templates/layout.html index edebe7b..590c3cb 100644 --- a/controller/internal/web/templates/layout.html +++ b/controller/internal/web/templates/layout.html @@ -22,7 +22,7 @@
diff --git a/controller/internal/web/templates/settings.html b/controller/internal/web/templates/settings.html index 5fd4ba2..9ddd81f 100644 --- a/controller/internal/web/templates/settings.html +++ b/controller/internal/web/templates/settings.html @@ -58,7 +58,7 @@