v0.149.0 — F3: the dashboard backup card tells the truth about the last run
The card claimed "Utolsó mentés: Még nem futott" on every box, forever, even
with dumps on disk and db_dump_completed events in the hub. dashboard.html
branches on {{if .BackupStatus}} and reads .Success/.LastRun, but
dashboardHandler never set that key — so the {{if}} arm was unreachable and
the "never ran" else-branch rendered unconditionally. The neighbouring
"Adatbázisok: N mentve" row kept working because it reads DBDumpStatus, which
was passed; that is the contradiction the audit caught on the live box.
Fix is the one-line pass-through the template always expected:
data["BackupStatus"] = fullStatus.LastDBDump. *DBDumpStatus nil/non-nil maps
onto the template's branch, so a fresh box still reads "Még nem futott" and no
zero-value timestamp is fabricated. No template change, no new view-model.
Tests drive the real handler through ServeHTTP so they bite on the handler
wiring, not the template alone. Red-proofed: deleting the assignment fails
TestDashboardBackupCard_ShowsLastRun.
Origin: felhom.eu/documentation/audits/AUDIT-vacation-remote-ops-2026-07-20.md (F3)
This commit is contained in:
@@ -1,5 +1,32 @@
|
||||
## Changelog
|
||||
|
||||
### v0.149.0 — the dashboard tells the truth about the last backup (2026-07-20)
|
||||
|
||||
Closes **F3** from `felhom.eu/documentation/audits/AUDIT-vacation-remote-ops-2026-07-20.md`.
|
||||
|
||||
The dashboard's backup card claimed **„Utolsó mentés: Még nem futott"** on every box, forever —
|
||||
including boxes with dumps on disk and `crossdrive_completed` / `db_dump_completed` events already
|
||||
recorded in the hub. It was not a backup failure; it was a lie in the view layer.
|
||||
|
||||
`dashboard.html` branches the row on `{{if .BackupStatus}}` and reads `.Success` / `.LastRun` from
|
||||
it, but `dashboardHandler` never put `BackupStatus` in the template data. The key was always
|
||||
missing, so the `{{if}}` arm was unreachable and the `{{else}}` — "never ran" — rendered
|
||||
unconditionally. The neighbouring „Adatbázisok: N mentve" row kept working because it reads
|
||||
`DBDumpStatus`, which *was* passed; that is exactly the contradiction the audit caught on the live
|
||||
box (a card reporting "never ran" directly above "2 mentve").
|
||||
|
||||
The fix is the one-line pass-through the template always expected:
|
||||
`data["BackupStatus"] = fullStatus.LastDBDump`. `*DBDumpStatus` nil/non-nil maps exactly onto the
|
||||
template's branch, so a genuinely fresh box still reads „Még nem futott" honestly and no zero-value
|
||||
timestamp is ever fabricated. No template change, no new view-model, and "utolsó mentés" keeps its
|
||||
existing meaning (the last DB-dump run, consistent with the backups page's DB section).
|
||||
|
||||
Tests (`internal/web/dashboard_backup_card_test.go`) drive the **real handler** through
|
||||
`ServeHTTP` rather than the template alone, so they bite on the handler wiring: a planted dump file
|
||||
on the app's drive must surface as its own timestamp; a box with no dump must still say „Még nem
|
||||
futott" and must not render `0001-01-01`; a failed run must render „Sikertelen". Red-proofed —
|
||||
deleting the new assignment fails the first of those.
|
||||
|
||||
### v0.148.0 — coherent snapshot pairs + an offsite restore that actually restores (2026-07-19)
|
||||
|
||||
Closes **R-43** and **R-44**, the two findings from `DIAG-immich-restore-2026-07-19`. The short
|
||||
|
||||
Reference in New Issue
Block a user