fix(dashboard): use GetFullStatus for backup display after restart
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
3e8baebfa5
commit
3f30803432
1 file changed
+6
-4
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user