fix(site): keep last known update count in systems table when host is down (#2559)

This commit is contained in:
Sven van Ginkel
2026-10-09 12:10:46 -04:00
committed by GitHub
parent 5529d2e15e
commit 5714643ff9
@@ -476,7 +476,7 @@ export function SystemsTableColumns(viewMode: "table" | "grid"): ColumnDef<Syste
},
cell(info) {
const sys = info.row.original
if (sys.status !== SystemStatus.Up || !sys.info.pu) {
if (!sys.info.pu) {
return null
}
const [total, security = 0] = sys.info.pu
@@ -487,6 +487,7 @@ export function SystemsTableColumns(viewMode: "table" | "grid"): ColumnDef<Syste
[STATUS_COLORS[SystemStatus.Down]]: security > 0,
[STATUS_COLORS[SystemStatus.Pending]]: security === 0 && total > 0,
[STATUS_COLORS[SystemStatus.Up]]: total === 0,
[STATUS_COLORS[SystemStatus.Paused]]: sys.status !== SystemStatus.Up,
})}
/>
{total === 0 ? t`Up to date` : plural(total, { one: "# update", other: "# updates" })}