Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Show a PBS server's host stats once in Backups

rcourtmanb3d654084228
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index feacf66b51..064deaab74 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -8849,6 +8849,15 @@ a neighbouring feature: the alerts Schedule page is "Delivery Schedule" in
every locale, and `i18n.test.ts` refuses a maintenance word in any locale's
title because maintenance windows live elsewhere.
+### Repeated parent cells show once per group
+
+When a table keeps one row per child so each child keeps its own figures,
+toggle and link (PBS datastores under a server), the parent's own readings
+render once, on the group's first row. Later rows keep the parent's name,
+muted, and leave the parent cells empty, so one parent never reads as several
+identical ones. The rows must already be grouped; the Backups "Backup server"
+table follows this through `BackupServerRow.continuesServer`.
+
### A refused setting reports the state the server kept
When a write is refused because the server owns the value (an environment
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 30d6c3f918..8e5f779eb2 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -241,6 +241,19 @@ source evidence and independent datastore identity. The production-component
browser fixture checks desktop and narrow phone layouts. These synthetic
checks establish no native datastore repair, backup/thaw or release acceptance.
+### A multi-datastore PBS server reads as one server
+
+The Backups "Backup server" table keeps one row per server and datastore, so
+each datastore keeps its own capacity, count, dedup, detail toggle and web
+link. Host status, version, CPU, memory and uptime render only on a server's
+first datastore row (`buildBackupServerRows` marks later rows
+`continuesServer`); later rows show the server name muted and leave those host
+cells empty, so two datastores no longer read as two identical servers. Rows
+stay grouped (servers by name then ID, datastores by name), and windowing
+follows the scroll position, so a later row is only ever mounted without its
+first row once that first row has scrolled out of view. Capacity evidence is
+unchanged: an offline server's later datastore still reads Unavailable.
+
### TrueNAS connection probes do not settle recovery inventory
A successful settings probe reads system information only, on a separate client.
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index 4eb790a50c..9d28a309b7 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -408,6 +408,11 @@ server health or the other source's artifacts. Fixed diagnostics expose no
response body. The inventory parser, mounted table and
`browser-tests/backup-inventory-format.cjs` exercise that combined boundary.
+`BackupServerRow.continuesServer` is presentation only: every row still
+carries the server's host readings and resource snapshot, and the model test
+pins the readings on every row while the flag is true only for a server's
+later datastore rows.
+
### Guest disk freshness presentation
Existing workload disk evidence retains its source reason through the row,
diff --git a/frontend-modern/browser-verification/8f1e7665adf889d2.json b/frontend-modern/browser-verification/8f1e7665adf889d2.json
new file mode 100644
index 0000000000..059376e541
--- /dev/null
+++ b/frontend-modern/browser-verification/8f1e7665adf889d2.json
@@ -0,0 +1,36 @@
+{
+ "version": 1,
+ "base_sha": "200caca27c1a9da9aede27f55f2bc10edd13ca4c",
+ "verified_at": "2026-10-16T09:55:00Z",
+ "result": "passed",
+ "changed_paths": [
+ "frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx"
+ ],
+ "content_sha256": {
+ "frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx": "b9f4c66bc2970ee689b584573eccc4bb4c7e73efc06b7a573d23be1a35a691ea"
+ },
+ "routes": [
+ "/proxmox/backups"
+ ],
+ "viewports": [
+ {
+ "width": 1024,
+ "height": 768
+ },
+ {
+ "width": 375,
+ "height": 812
+ }
+ ],
+ "states": [
+ "Before (main): the Backup server table showed backup-vault twice, once per datastore (offsite-vault, primary-vault), each with Healthy, 10.7% CPU, 35.8% memory and 30d uptime, reading as two identical servers",
+ "After at 1024px: the first backup-vault row carries status, CPU, memory and uptime; the second shows backup-vault muted with those cells empty and only its datastore, used and count",
+ "The second row keeps its own detail toggle: clicking it opened the backup-vault drawer (aria-expanded true), then closed it",
+ "At 375px (compact layout) the second row shows backup-vault, an empty state cell, primary-vault and 27.4%; page scrollWidth 375"
+ ],
+ "interactions": [
+ "Signed in to a private mock stack and opened Proxmox > Backups; read each server-table row cell by cell from the DOM and looked at a full screenshot",
+ "Opened and closed the detail drawer from the continuation row",
+ "Resized to the mobile preset and re-read the rows and page width"
+ ]
+}
diff --git a/frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx
index 81bc015757..521e8b5428 100644
--- a/frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx
+++ b/frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx
@@ -42,8 +42,11 @@ import {
// so it lives here on the Backups page, not buried on the platform Storage tab
// where the rows read as generic "PVE" storage. One row per datastore, labelled
// by its server; a server with no datastore data still gets a reachability row.
-// Host CPU/memory/uptime ride along on each of the server's rows: PBS hosts
-// left the v5 nodes table in the v6 IA, so this is where their health lives.
+// PBS hosts left the v5 nodes table in the v6 IA, so this is where their health
+// lives. Host status, version, CPU, memory and uptime show once, on the server's
+// first datastore row; its later rows keep the server name (muted), toggle and
+// web link but leave those host cells empty, so two datastores never read as
+// two identical servers.
interface BackupServerRow {
key: string;
@@ -59,6 +62,8 @@ interface BackupServerRow {
uptimeSeconds?: number;
datastore?: ResourcePBSDatastore;
backupCount: number;
+ // A later datastore row of the server on the row above: host cells stay empty.
+ continuesServer: boolean;
}
// Key by instance and datastore so multi-datastore servers get accurate counts.
@@ -388,12 +393,19 @@ export function buildBackupServerRows(
// Unwrap reactive source DTOs before cloning; never clone their proxies.
const resourceSnapshot = () => structuredClone(unwrap(server));
if (datastores.length === 0) {
- rows.push({ key: server.id, ...host, resource: resourceSnapshot(), backupCount: 0 });
+ rows.push({
+ key: server.id,
+ ...host,
+ resource: resourceSnapshot(),
+ backupCount: 0,
+ continuesServer: false,
+ });
continue;
}
- for (const datastore of datastores) {
+ for (const [index, datastore] of datastores.entries()) {
rows.push({
key: `${server.id}:${datastore.name}`,
+ continuesServer: index > 0,
...host,
resource: resourceSnapshot(),
// Row stores reconcile independently from the nested PBS snapshot. Do
@@ -529,7 +541,9 @@ export function ProxmoxBackupServersTable(props: {
})}
>
<TableCell
- class={`${getPlatformTableCellClassForKind('name')} text-base-content truncate font-medium`}
+ class={`${getPlatformTableCellClassForKind('name')} truncate ${
+ row.continuesServer ? 'text-muted' : 'text-base-content font-medium'
+ }`}
title={[row.serverName, row.datastore?.name].filter(Boolean).join(' · ')}
>
<div class="flex min-w-0 items-center gap-1">
@@ -548,62 +562,68 @@ export function ProxmoxBackupServersTable(props: {
</div>
</TableCell>
<TableCell class={getPlatformTableCellClassForKind('text')}>
- <div class="flex items-center gap-2">
- <Show when={layoutMode() !== 'compact'}>
- <StatusDot
- size="sm"
- variant={row.online ? 'success' : 'danger'}
+ <Show when={!row.continuesServer}>
+ <div class="flex items-center gap-2">
+ <Show when={layoutMode() !== 'compact'}>
+ <StatusDot
+ size="sm"
+ variant={row.online ? 'success' : 'danger'}
+ title={row.connectionLabel}
+ ariaHidden
+ />
+ </Show>
+ <span
+ class="truncate text-[11px] text-base-content"
title={row.connectionLabel}
- ariaHidden
- />
- </Show>
- <span
- class="truncate text-[11px] text-base-content"
- title={row.connectionLabel}
- >
- {row.connectionLabel}
- </span>
- </div>
+ >
+ {row.connectionLabel}
+ </span>
+ </div>
+ </Show>
</TableCell>
<Show when={columnVisible('version')}>
<TableCell
class={`${getPlatformTableCellClassForKind('text')} text-muted truncate text-[11px]`}
>
- {row.version || '—'}
+ <Show when={!row.continuesServer}>{row.version || '—'}</Show>
</TableCell>
</Show>
<Show when={columnVisible('cpu')}>
<TableCell
class={`${getPlatformTableCellClassForKind('numeric-value')} text-base-content`}
>
- <Show
- when={row.online && row.cpuPercent !== undefined}
- fallback={<span class="text-muted">—</span>}
- >
- <PlatformTablePercentValue value={row.cpuPercent} />
+ <Show when={!row.continuesServer}>
+ <Show
+ when={row.online && row.cpuPercent !== undefined}
+ fallback={<span class="text-muted">—</span>}
+ >
+ <PlatformTablePercentValue value={row.cpuPercent} />
+ </Show>
</Show>
</TableCell>
</Show>
<Show when={columnVisible('memory')}>
<TableCell class={getPlatformTableCellClassForKind('numeric-value')}>
- <Show
- when={row.online && row.memoryPercent !== undefined}
- fallback={<span class="text-muted">—</span>}
- >
- <span
- class="text-base-content"
- title={
- row.memoryTotal
- ? `${formatPlatformTableBytesValue(row.memoryUsed, '0 B')} / ${formatPlatformTableBytesValue(row.memoryTotal)}`
- : undefined
- }
+ <Show when={!row.continuesServer}>
+ <Show
+ when={row.online && row.memoryPercent !== undefined}
+ fallback={<span class="text-muted">—</span>}
>
- <PlatformTablePercentValue value={row.memoryPercent} />
- </span>
- <Show when={row.memoryTotal && layoutMode() === 'full'}>
- <span class="ml-1 text-[10px] text-muted tabular-nums">
- {`(${formatPlatformTableBytesValue(row.memoryUsed, '0 B')}/${formatPlatformTableBytesValue(row.memoryTotal)})`}
+ <span
+ class="text-base-content"
+ title={
+ row.memoryTotal
+ ? `${formatPlatformTableBytesValue(row.memoryUsed, '0 B')} / ${formatPlatformTableBytesValue(row.memoryTotal)}`
+ : undefined
+ }
+ >
+ <PlatformTablePercentValue value={row.memoryPercent} />
</span>
+ <Show when={row.memoryTotal && layoutMode() === 'full'}>
+ <span class="ml-1 text-[10px] text-muted tabular-nums">
+ {`(${formatPlatformTableBytesValue(row.memoryUsed, '0 B')}/${formatPlatformTableBytesValue(row.memoryTotal)})`}
+ </span>
+ </Show>
</Show>
</Show>
</TableCell>
@@ -612,11 +632,13 @@ export function ProxmoxBackupServersTable(props: {
<TableCell
class={`${getPlatformTableCellClassForKind('numeric-value')} text-base-content tabular-nums`}
>
- <Show
- when={row.online && (row.uptimeSeconds ?? 0) > 0}
- fallback={<span class="text-muted">—</span>}
- >
- {formatPlatformTableUptimeValue(row.uptimeSeconds)}
+ <Show when={!row.continuesServer}>
+ <Show
+ when={row.online && (row.uptimeSeconds ?? 0) > 0}
+ fallback={<span class="text-muted">—</span>}
+ >
+ {formatPlatformTableUptimeValue(row.uptimeSeconds)}
+ </Show>
</Show>
</TableCell>
</Show>
diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupServersTable.test.ts b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupServersTable.test.ts
index 222caf0d18..82fbbc35ff 100644
--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupServersTable.test.ts
+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupServersTable.test.ts
@@ -61,6 +61,28 @@ describe('buildBackupServerRows', () => {
expect(row.uptimeSeconds).toBe(1_036_800);
}
expect(rows.map((row) => row.datastore?.name)).toEqual(['offsite', 'tank']);
+ // The table shows host cells once per server: only later rows continue it.
+ expect(rows.map((row) => row.continuesServer)).toEqual([false, true]);
+ });
+
+ it('starts every server, and every reachability-only row, as its own first row', () => {
+ const first = makePbsResource();
+ const second = makePbsResource({ id: 'pbs-2', name: 'pbs-second' });
+ const empty = makePbsResource({
+ id: 'pbs-3',
+ name: 'pbs-third',
+ pbs: { instanceId: 'pbs-third', connectionHealth: 'healthy', datastores: [] },
+ });
+
+ const rows = buildBackupServerRows([empty, second, first]);
+
+ expect(rows.map((row) => [row.serverName, row.continuesServer])).toEqual([
+ ['pbs-main', false],
+ ['pbs-main', true],
+ ['pbs-second', false],
+ ['pbs-second', true],
+ ['pbs-third', false],
+ ]);
});
it('keeps server and datastore rows stable when provider order changes', () => {
diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx
index 2841bd95cc..9a9de59c04 100644
--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx
+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx
@@ -270,6 +270,53 @@ describe('ProxmoxBackupsTable', () => {
expect(apiFetchMock.mock.calls.filter(([url]) => url === '/api/backups/pbs')).toHaveLength(1);
});
+ it('shows host cells once for a server with several datastores', async () => {
+ mockBackupAPIs();
+ const twoStores = {
+ ...pbsServerResource,
+ pbs: {
+ ...pbsServerResource.pbs!,
+ datastores: [
+ ...pbsServerResource.pbs!.datastores!,
+ { name: 'offsite', total: 20_000, used: 5_000, available: 15_000, usagePercent: 25 },
+ ],
+ },
+ } as Resource;
+ const { container } = renderInRouter(() => (
+ <ProxmoxBackupsTable
+ emptyIcon={<span />}
+ workloads={[workloadResource]}
+ servers={[twoStores]}
+ />
+ ));
+ await screen.findByText('offsite');
+ const table = container.querySelector('[data-proxmox-backups-table="servers"]') as HTMLElement;
+ const columns = Array.from(table.querySelectorAll('col')).map((col) =>
+ col.getAttribute('data-proxmox-backups-column'),
+ );
+ const dataRows = () =>
+ Array.from(table.querySelectorAll('tbody tr')).filter(
+ (row) => row.querySelectorAll('td').length === columns.length,
+ );
+ const cellText = (row: number, column: string) => {
+ expect(columns).toContain(column);
+ return dataRows()[row].querySelectorAll('td')[columns.indexOf(column)].textContent?.trim();
+ };
+
+ // Two datastores of one server read as one server, not two identical ones:
+ // the host cells sit on its first row, and the second row keeps its name
+ // and its own datastore figures.
+ expect(dataRows()).toHaveLength(2);
+ expect(within(table).getAllByText('pbs-main')).toHaveLength(2);
+ for (const column of ['status', 'version', 'cpu', 'memory', 'uptime']) {
+ expect(cellText(0, column)).not.toBe('');
+ expect(cellText(1, column)).toBe('');
+ }
+ expect(cellText(0, 'datastore')).toBe('main');
+ expect(cellText(1, 'datastore')).toBe('offsite');
+ expect(cellText(1, 'used')).toContain('25');
+ });
+
it('uses a corroborated PBS host link for Backups History despite a PVE-only name collision', () => {
const pbs = {
...pbsServerResource,