mirror of
https://github.com/henrygd/beszel.git
synced 2026-10-21 22:02:34 +00:00
fix(site): keep last known update count in systems table when host is down (#2559)
This commit is contained in:
@@ -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" })}
|
||||
|
||||
Reference in New Issue
Block a user