From 3f30803432fd0b003c0cf75ad9aacb69160e7f2c Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Mon, 16 Feb 2026 10:20:14 +0100 Subject: [PATCH] fix(dashboard): use GetFullStatus for backup display after restart MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dashboard was using GetStatus() which returns nil after restart, showing "Még nem futott" even when backups exist. Now uses GetFullStatus() with synthesis logic, matching the backups page. Co-Authored-By: Claude Opus 4.6 --- controller/internal/web/handlers.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/controller/internal/web/handlers.go b/controller/internal/web/handlers.go index 07a6f57..de9a9d5 100644 --- a/controller/internal/web/handlers.go +++ b/controller/internal/web/handlers.go @@ -56,10 +56,12 @@ func (s *Server) dashboardHandler(w http.ResponseWriter, _ *http.Request) { // Backup status data["BackupEnabled"] = s.cfg.Backup.Enabled if s.backupMgr != nil { - dbDump, backupSt := s.backupMgr.GetStatus() - data["DBDumpStatus"] = dbDump - data["BackupStatus"] = backupSt - data["BackupRunning"] = s.backupMgr.IsRunning() + nextDBDump := scheduler.NextDailyRun(s.cfg.Backup.DBDumpSchedule) + nextBackup := scheduler.NextDailyRun(s.cfg.Backup.ResticSchedule) + fullStatus := s.backupMgr.GetFullStatus(nextDBDump, nextBackup) + data["DBDumpStatus"] = fullStatus.LastDBDump + data["BackupStatus"] = fullStatus.LastBackup + data["BackupRunning"] = fullStatus.Running data["BackupMaxAgeHours"] = s.cfg.Monitoring.Thresholds.BackupMaxAgeHours }