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.

Group Backup servers datastores under a header per server

rcourtman5030d990ac58
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 6e358dd7fc..76fe07113b 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -554,6 +554,18 @@ route, navigation, access or backup operation changes.
and phone, so a filtering row looks clickable without adding height. Rows that
open nothing leave the track empty, so every row's columns still line up.
+### Backup servers rows group under a header per server (2 November 2026)
+
+`ProxmoxBackupServersTable` renders one `getGroupedTableRowClass` header row
+per PBS resource, spanning every column, before that resource's datastore
+rows: a connection `StatusDot`, `ResourceNameWithWebInterfaceLink` for the
+server, and a datastore count in `GROUPED_TABLE_ROW_META_CLASS`, omitted when
+the server has no datastore rows. Datastore rows show only the datastore name;
+the muted server name and per-row web link are gone. `groupBackupServerRows`
+builds the items, keyed `server:` and `datastore:` so an item never changes
+kind, and the header carries plain values only so its windowed store never
+aliases a datastore row's resource snapshot. Rows stay single-line.
+
### Backup servers rows lead with the datastore (2 November 2026)
`getBackupServerColumns` drops the `server` and separate `datastore` columns for
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 2c092c5b65..cb3e7cceb9 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -5104,6 +5104,19 @@ amber and red as the Overview CPU, memory and disk bars. They had their own
shades, so the Backups page looked inconsistent beside every other page. What
each bar counts is unchanged.
+### Backup servers rows sit under one header per server (2 November 2026)
+
+The Backup servers table now puts a header row above each PBS server's
+datastores: its connection dot, its name with the web-interface link, and how
+many datastores it reports. On a real install with one server and two
+datastores, a muted server name on each row still left the maintainer asking
+whether they ran one PBS or two; the header answers that at a glance, the way
+guest tables group by node. Datastore rows are named by the datastore alone. A
+server with no datastore data keeps its reachability row, and its header
+claims no count, because an empty read is not proof of no datastores. The
+earlier note that each row carries its server's name and web link is
+historical.
+
### Backup servers rows are named by their datastore (2 November 2026)
The Backup servers table keeps one row per datastore, but each row is now
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index ac04eb74a2..c24ecf37c6 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -230,6 +230,14 @@ of a PBS resource only when it is a failed read (`partial-read` or carrying an
`error`) or a failed or warned run. A storeless `observed-task` run whose
status is merely unclear no longer does.
+### Backup servers group datastore rows by PBS resource (2 November 2026)
+
+`ProxmoxBackupServersTable` still renders one row per datastore of a `pbs`
+resource, keyed by resource and datastore, with unchanged drawers. A header row
+per resource now carries the resource's name, web-interface link, connection
+status and datastore count, so datastore rows no longer repeat the resource
+name or link. The State cell still reads the resource's connection status.
+
### Backup servers rows name the datastore, then its PBS resource (2 November 2026)
`ProxmoxBackupServersTable` still renders one row per datastore of a `pbs`
diff --git a/frontend-modern/browser-verification/a5e803fe542f291b.json b/frontend-modern/browser-verification/a5e803fe542f291b.json
new file mode 100644
index 0000000000..67f3605f91
--- /dev/null
+++ b/frontend-modern/browser-verification/a5e803fe542f291b.json
@@ -0,0 +1,36 @@
+{
+ "version": 1,
+ "base_sha": "c7271c81868d8b41260932f64870de5ddb2b2e52",
+ "verified_at": "2026-11-02T21:55:00Z",
+ "result": "passed",
+ "changed_paths": [
+ "frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx"
+ ],
+ "content_sha256": {
+ "frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx": "a4813584e2743da04a3cb3251bc40a637be8288c4f46485d6300bd74ae650448"
+ },
+ "routes": [
+ "/proxmox/backups/date"
+ ],
+ "viewports": [
+ {
+ "width": 1440,
+ "height": 1000
+ },
+ {
+ "width": 375,
+ "height": 812
+ }
+ ],
+ "states": [
+ "mock mode built from this branch on pulse-dev: two PBS servers, backup-vault with two datastores and dr-vault with one",
+ "real-config clone built from this branch on pulse-dev, reading the maintainer PBS with one server and two datastores",
+ "desktop and phone layouts"
+ ],
+ "interactions": [
+ "opened Proxmox > Backups in mock mode at 1440x1000: the Backup servers table shows a header row per server (status dot, name, datastore count) above its datastore rows, and datastore rows carry no server name",
+ "at 375x812 the same table renders 32px header and datastore rows with no horizontal page overflow",
+ "before this change the maintainer, looking at their real one-server, two-datastore install, asked whether they ran one PBS server or two",
+ "unit coverage pins grouping order and counts, one web link per server, live header updates when connection state and datastores change, and no count when a server reports no datastore rows"
+ ]
+}
diff --git a/frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx
index d5dcf6ab52..d827fd8259 100644
--- a/frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx
+++ b/frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx
@@ -2,6 +2,11 @@ import { For, Show, createMemo, type Accessor, type JSX } from 'solid-js';
import { unwrap } from 'solid-js/store';
import { StatusDot } from '@/components/shared/StatusDot';
+import {
+ GROUPED_TABLE_ROW_META_CLASS,
+ getGroupedTableRowCellClass,
+ getGroupedTableRowClass,
+} from '@/components/shared/groupedTableRowPresentation';
import { ResourceNameWithWebInterfaceLink } from '@/components/shared/WebInterfaceLink';
import { TableCell, TableHead, TableRow } from '@/components/shared/Table';
import { DetailSectionTable, type DetailValueTone } from '@/components/shared/DetailSectionTable';
@@ -55,15 +60,14 @@ import {
// where the rows read as generic "PVE" storage. Each datastore row also says
// whether its GC, prune, verify and sync jobs last succeeded, because a failed
// sync or verify leaves backups that exist but cannot be relied on. One row
-// per datastore, named by the datastore with its server beside it in muted
-// text, the way restore point rows name a workload and its connection; a
-// server with no datastore data still gets a reachability row under its own
-// name. Rows named by their server read as two servers, and hiding the
-// repeated name left a nameless row.
+// per datastore, grouped under a header row per PBS server that carries its
+// reachability, web link and datastore count, the way guest tables group by
+// node. Rows named by their server read as two servers; a muted server name
+// on each datastore row still left "how many servers do I have?" unanswered.
+// A server with no datastore data still gets a reachability row.
// PBS hosts left the v5 nodes table in the v6 IA, so this is where their health
// lives. The row says whether the server is reachable; its CPU, memory, uptime,
-// version and their history are in the server's drawer, one click away. Every
-// row carries its server's status and web link, so each row reads on its own.
+// version and their history are in the server's drawer, one click away.
interface BackupServerRow {
key: string;
@@ -77,6 +81,42 @@ interface BackupServerRow {
backupCount: number;
}
+interface BackupServerGroup {
+ key: string;
+ // Only plain values: each windowed item is its own reconciled store, so the
+ // header must not alias a datastore row's resource snapshot.
+ customUrl?: string;
+ serverName: string;
+ online: boolean;
+ connectionLabel: string;
+ datastoreCount: number;
+}
+
+type BackupServerTableItem =
+ { kind: 'server'; group: BackupServerGroup } | { kind: 'datastore'; row: BackupServerRow };
+
+// Rows arrive sorted by server, so each server's header precedes its rows.
+export function groupBackupServerRows(rows: readonly BackupServerRow[]): BackupServerTableItem[] {
+ const items: BackupServerTableItem[] = [];
+ let current: BackupServerGroup | undefined;
+ for (const row of rows) {
+ if (current?.key !== row.resource.id) {
+ current = {
+ key: row.resource.id,
+ customUrl: row.resource.customUrl,
+ serverName: row.serverName,
+ online: row.online,
+ connectionLabel: row.connectionLabel,
+ datastoreCount: 0,
+ };
+ items.push({ kind: 'server', group: current });
+ }
+ if (row.datastore) current.datastoreCount += 1;
+ items.push({ kind: 'datastore', row });
+ }
+ return items;
+}
+
// Key by instance and datastore so multi-datastore servers get accurate counts.
function buildBackupCounts(backups: readonly PBSBackup[]): Map<string, Map<string, number>> {
const counts = new Map<string, Map<string, number>>();
@@ -529,6 +569,42 @@ export function buildBackupServerRows(
return rows;
}
+// The server's header row: reachability, web link and how many datastores it
+// reports, so one server with two datastores never reads as two servers.
+function BackupServerGroupRow(props: { group: BackupServerGroup; colSpan: number }) {
+ const count = () => props.group.datastoreCount;
+ return (
+ <tr class={getGroupedTableRowClass()} data-backup-server-group={props.group.serverName}>
+ <td colspan={props.colSpan} class={getGroupedTableRowCellClass()}>
+ <div
+ class={`flex min-w-0 items-center gap-2 ${props.group.online ? '' : 'opacity-60'}`}
+ title={props.group.connectionLabel}
+ >
+ <StatusDot
+ variant={props.group.online ? 'success' : 'danger'}
+ title={props.group.connectionLabel}
+ ariaLabel={props.group.connectionLabel}
+ size="xs"
+ />
+ <ResourceNameWithWebInterfaceLink
+ name={props.group.serverName}
+ url={props.group.customUrl}
+ class="min-w-0"
+ nameClass="block min-w-0 truncate text-base-content"
+ />
+ {/* No datastore rows can mean the read failed, not that the server
+ has none, so the header claims no count; its row says why. */}
+ <Show when={count() > 0}>
+ <span class={`shrink-0 ${GROUPED_TABLE_ROW_META_CLASS}`}>
+ {count()} {count() === 1 ? 'datastore' : 'datastores'}
+ </span>
+ </Show>
+ </div>
+ </td>
+ </tr>
+ );
+}
+
export function ProxmoxBackupServersTable(props: {
servers: readonly Resource[];
backups?: readonly PBSBackup[];
@@ -543,6 +619,7 @@ export function ProxmoxBackupServersTable(props: {
const rows = createMemo(() =>
buildBackupServerRows(props.servers, props.backups ?? [], retention),
);
+ const tableItems = createMemo(() => groupBackupServerRows(rows()));
const observedWidth = useObservedElementWidth();
const layoutMode = createMemo(() => {
const width = props.layoutWidth?.() ?? observedWidth.width();
@@ -617,11 +694,21 @@ export function ProxmoxBackupServersTable(props: {
body={
<>
<PlatformWindowedRows
- items={rows}
- keyExtractor={(row) => row.key}
+ items={tableItems}
+ keyExtractor={(item) =>
+ item.kind === 'server' ? `server:${item.group.key}` : `datastore:${item.row.key}`
+ }
+ colSpan={visibleColumns().length}
estimatedRowHeight={32}
>
- {(row) => {
+ {(item) => {
+ // The kind is part of the key, so an item never changes kind.
+ if (item.kind === 'server') {
+ return (
+ <BackupServerGroupRow group={item.group} colSpan={visibleColumns().length} />
+ );
+ }
+ const row = item.row;
// Read admission is not a generic storage-adapter capacity snapshot.
const capacityEvidence = () => datastoreCapacity(row.datastore, row.online);
const pct = () => capacityEvidence().percent;
@@ -684,34 +771,16 @@ export function ProxmoxBackupServersTable(props: {
<Show
when={row.datastore}
fallback={
- <ResourceNameWithWebInterfaceLink
- name={row.serverName}
- url={row.resource.customUrl}
- class="min-w-0 flex-1"
- nameClass="block min-w-0 flex-1 truncate font-medium"
- />
+ <span class="block min-w-0 flex-1 truncate text-muted">—</span>
}
>
{(datastore) => (
- <div class="flex min-w-0 flex-1 items-baseline gap-1.5">
- {/* The datastore name keeps priority but leaves room
- for the server's web link, so a long name can never
- push a focusable link out of view. */}
- <span
- class="min-w-0 max-w-[calc(100%-2rem)] shrink-0 truncate font-medium"
- data-backup-server-datastore
- >
- {datastore().name}
- </span>
- <span class="flex min-w-6 flex-1">
- <ResourceNameWithWebInterfaceLink
- name={row.serverName}
- url={row.resource.customUrl}
- class="min-w-0 flex-1"
- nameClass="block min-w-0 truncate text-[10px] text-muted"
- />
- </span>
- </div>
+ <span
+ class="block min-w-0 flex-1 truncate font-medium"
+ data-backup-server-datastore
+ >
+ {datastore().name}
+ </span>
)}
</Show>
</div>
diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupServersTable.capacity.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupServersTable.capacity.test.tsx
index b5956ddeb6..509b5a1975 100644
--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupServersTable.capacity.test.tsx
+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupServersTable.capacity.test.tsx
@@ -40,7 +40,9 @@ function usedCell(container: HTMLElement) {
const index = Array.from(table.querySelectorAll('th')).findIndex(
(head) => head.textContent === 'Used',
);
- return table.querySelector('tbody tr')!.querySelectorAll('td')[index] as HTMLElement;
+ return table.querySelector('tbody tr:not([data-backup-server-group])')!.querySelectorAll('td')[
+ index
+ ] as HTMLElement;
}
describe('PBS datastore capacity evidence', () => {
diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupServersTable.test.ts b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupServersTable.test.ts
index 882276bc2b..5f21f7e049 100644
--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupServersTable.test.ts
+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupServersTable.test.ts
@@ -1,7 +1,11 @@
import { describe, expect, it } from 'vitest';
import type { Resource } from '@/types/resource';
-import { buildBackupServerRows, createPbsCorrelationRetention } from '../ProxmoxBackupServersTable';
+import {
+ buildBackupServerRows,
+ createPbsCorrelationRetention,
+ groupBackupServerRows,
+} from '../ProxmoxBackupServersTable';
const makePbsResource = (overrides: Partial<Resource> = {}): Resource =>
({
@@ -85,6 +89,36 @@ describe('buildBackupServerRows', () => {
]);
});
+ it('puts one header before the datastores of each server and counts them', () => {
+ const first = makePbsResource();
+ const second = makePbsResource({ id: 'pbs-2', name: 'pbs-second', status: 'offline' });
+ const empty = makePbsResource({
+ id: 'pbs-3',
+ name: 'pbs-third',
+ pbs: { instanceId: 'pbs-third', connectionHealth: 'healthy', datastores: [] },
+ });
+ second.pbs = { ...second.pbs!, connectionHealth: 'error' };
+
+ const items = groupBackupServerRows(buildBackupServerRows([empty, second, first]));
+
+ expect(
+ items.map((item) =>
+ item.kind === 'server'
+ ? ['server', item.group.serverName, item.group.datastoreCount, item.group.online]
+ : ['datastore', item.row.datastore?.name ?? null],
+ ),
+ ).toEqual([
+ ['server', 'pbs-main', 2, true],
+ ['datastore', 'offsite'],
+ ['datastore', 'tank'],
+ ['server', 'pbs-second', 2, false],
+ ['datastore', 'offsite'],
+ ['datastore', 'tank'],
+ ['server', 'pbs-third', 0, true],
+ ['datastore', null],
+ ]);
+ });
+
it('keeps server and datastore rows stable when provider order changes', () => {
const firstServer = makePbsResource({
id: 'pbs-zulu',
diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupServersTable.webInterface.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupServersTable.webInterface.test.tsx
index d0392e04f3..3406d2042f 100644
--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupServersTable.webInterface.test.tsx
+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupServersTable.webInterface.test.tsx
@@ -54,7 +54,7 @@ const host: Resource = {
describe('PBS Backups web-interface parity', () => {
it.each([320, 390, 768, 1365])(
- 'uses the service-owned URL on every datastore at width %s without opening details',
+ 'uses the service-owned URL once, on the server header, at width %s without opening details',
(width) => {
const ancestorKeydown = vi.fn();
const { container } = render(() => (
@@ -65,7 +65,8 @@ describe('PBS Backups web-interface parity', () => {
const links = within(container).getAllByRole('link', {
name: 'Open web interface for pbs-main',
});
- expect(links).toHaveLength(2);
+ // The link lives on the server header row, not repeated on each datastore.
+ expect(links).toHaveLength(1);
for (const link of links) {
expect(link).toHaveAttribute('href', 'https://pbs-east.example:8007');
expect(link).toHaveAttribute('target', '_blank');
@@ -100,14 +101,12 @@ describe('PBS Backups web-interface parity', () => {
within(container)
.getAllByRole('link')
.map((a) => a.getAttribute('href'));
- expect(hrefs()).toEqual([east.customUrl, east.customUrl, west.customUrl, west.customUrl]);
+ expect(hrefs()).toEqual([east.customUrl, west.customUrl]);
setServers([
{ ...west, pbs: { ...west.pbs!, datastores: [...west.pbs!.datastores!].reverse() } },
east,
]);
- await waitFor(() =>
- expect(hrefs()).toEqual([east.customUrl, east.customUrl, west.customUrl, west.customUrl]),
- );
+ await waitFor(() => expect(hrefs()).toEqual([east.customUrl, west.customUrl]));
});
it.each([
@@ -123,19 +122,21 @@ describe('PBS Backups web-interface parity', () => {
expect(within(container).queryByRole('link')).not.toBeInTheDocument();
expect(
within(container).getAllByRole('img', { name: 'Web interface URL for pbs-main is invalid' }),
- ).toHaveLength(2);
- expect(within(container).getAllByText('pbs-main')).toHaveLength(2);
+ ).toHaveLength(1);
+ expect(within(container).getAllByText('pbs-main')).toHaveLength(1);
});
it('withdraws an edited or cleared URL without replacing it with a host, name or remembered endpoint', async () => {
const pbs = server();
const [servers, setServers] = createSignal([pbs, host]);
const { container } = render(() => <ProxmoxBackupServersTable servers={servers()} />);
- expect(within(container).getAllByRole('link')).toHaveLength(2);
+ expect(within(container).getAllByRole('link')).toHaveLength(1);
setServers([{ ...pbs, customUrl: 'javascript:alert(1)' }, host]);
await waitFor(() => expect(within(container).queryByRole('link')).not.toBeInTheDocument());
setServers([{ ...pbs, customUrl: '' }, host]);
- await waitFor(() => expect(within(container).queryByRole('img')).not.toBeInTheDocument());
+ await waitFor(() =>
+ expect(within(container).queryByRole('img', { name: /is invalid/ })).not.toBeInTheDocument(),
+ );
expect(within(container).queryByRole('link')).not.toBeInTheDocument();
setServers([{ ...pbs, customUrl: ' https://new.example:8443/pbs/ ' }]);
await waitFor(() =>
@@ -146,6 +147,29 @@ describe('PBS Backups web-interface parity', () => {
);
});
+ it('keeps the server header current as polls change its state and datastores', async () => {
+ const pbs = server();
+ const [servers, setServers] = createSignal([pbs]);
+ const { container } = render(() => <ProxmoxBackupServersTable servers={servers()} />);
+ const header = () => container.querySelector('[data-backup-server-group]') as HTMLElement;
+ expect(header()).toHaveTextContent('2 datastores');
+ expect(within(header()).getByRole('img', { name: 'Healthy' })).toBeInTheDocument();
+ setServers([
+ {
+ ...pbs,
+ status: 'offline',
+ pbs: { ...pbs.pbs!, connectionHealth: 'error', datastores: [pbs.pbs!.datastores![1]] },
+ },
+ ]);
+ await waitFor(() => expect(header()).toHaveTextContent('1 datastore'));
+ expect(within(header()).getByRole('img', { name: 'Error' })).toBeInTheDocument();
+ expect(container.querySelectorAll('[data-backup-server-datastore]')).toHaveLength(1);
+ // A server whose datastore read returned nothing claims no count.
+ setServers([{ ...pbs, pbs: { ...pbs.pbs!, datastores: undefined } }]);
+ await waitFor(() => expect(header()).not.toHaveTextContent(/datastore/));
+ expect(container).toHaveTextContent('No datastore data');
+ });
+
it('does not invent an endpoint when a server has no custom URL or datastore', () => {
const pbs = { ...server(), customUrl: undefined, pbs: { ...server().pbs!, datastores: [] } };
const { container } = render(() => <ProxmoxBackupServersTable servers={[pbs, host]} />);
diff --git a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx
index d777343958..44dc4a50b3 100644
--- a/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx
+++ b/frontend-modern/src/features/proxmox/__tests__/ProxmoxBackupsTable.test.tsx
@@ -265,7 +265,10 @@ describe('ProxmoxBackupsTable', () => {
const usedColumn = Array.from(table.querySelectorAll('th')).findIndex(
(head) => head.textContent?.trim() === 'Used',
);
- const usedCell = () => table.querySelector('tbody tr')!.querySelectorAll('td')[usedColumn];
+ const usedCell = () =>
+ table.querySelector('tbody tr:not([data-backup-server-group])')!.querySelectorAll('td')[
+ usedColumn
+ ];
expect(within(usedCell()).getByText(expected).parentElement).toHaveClass(tone);
// Reconciled polling updates must recompute the same row, not retain the
@@ -340,7 +343,9 @@ describe('ProxmoxBackupsTable', () => {
const index = Array.from(table.querySelectorAll('th')).findIndex(
(head) => head.getAttribute('aria-label') === 'Backups',
);
- return table.querySelector('tbody tr')!.querySelectorAll('td')[index].textContent;
+ return table
+ .querySelector('tbody tr:not([data-backup-server-group])')!
+ .querySelectorAll('td')[index].textContent;
};
await within(table).findByText('Unavailable');
await waitFor(() => expect(backupCount()).toBe('1'));
@@ -354,7 +359,7 @@ describe('ProxmoxBackupsTable', () => {
expect(apiFetchMock.mock.calls.filter(([url]) => url === '/api/backups/pbs')).toHaveLength(1);
});
- it('names each row by its datastore, with its server beside it', async () => {
+ it('groups datastore rows under one header row per server', async () => {
mockBackupAPIs();
const twoStores = {
...pbsServerResource,
@@ -392,9 +397,13 @@ describe('ProxmoxBackupsTable', () => {
};
// Two datastores of one server read as two datastores, not two servers:
- // each row leads with its datastore name and carries its server and status,
- // so every row reads on its own. There is no separate server column. Host
- // CPU, memory, uptime and version are in the server's drawer, not the row.
+ // one header row names the server and counts its datastores, and each row
+ // under it leads with its datastore name. There is no separate server
+ // column. Host CPU, memory, uptime and version are in the server's drawer.
+ const groups = Array.from(table.querySelectorAll('[data-backup-server-group]'));
+ expect(groups).toHaveLength(1);
+ expect(groups[0]).toHaveTextContent('pbs-main');
+ expect(groups[0]).toHaveTextContent('2 datastores');
expect(dataRows()).toHaveLength(2);
expect(columns[0]).toBe('datastore');
expect(columns).not.toContain('server');
@@ -402,14 +411,14 @@ describe('ProxmoxBackupsTable', () => {
(name) => name.textContent,
);
expect(datastoreNames).toEqual(['main', 'offsite']);
- expect(within(table).getAllByText('pbs-main')).toHaveLength(2);
+ expect(within(table).getAllByText('pbs-main')).toHaveLength(1);
expect(cellText(0, 'status')).not.toBe('');
expect(cellText(1, 'status')).toBe(cellText(0, 'status'));
expect(
columns.filter((column) => ['version', 'cpu', 'memory', 'uptime'].includes(column ?? '')),
).toEqual([]);
- expect(cellText(0, 'datastore')).toBe('mainpbs-main');
- expect(cellText(1, 'datastore')).toBe('offsitepbs-main');
+ expect(cellText(0, 'datastore')).toBe('main');
+ expect(cellText(1, 'datastore')).toBe('offsite');
expect(cellText(1, 'used')).toContain('25');
const offsite = within(table).getByRole('button', {
name: 'Expand details for pbs-main · datastore offsite',
@@ -3462,7 +3471,9 @@ describe('PBS inventory state column', () => {
'col[data-proxmox-backups-column="backups"]',
)!;
// Datastore (with its server), status, used, jobs, then the count.
- const cells = table.querySelector('tbody tr')!.querySelectorAll('td');
+ const cells = table
+ .querySelector('tbody tr:not([data-backup-server-group])')!
+ .querySelectorAll('td');
expect(countColumn.style.width).toBe('11%');
expect(cells[4]).toHaveTextContent(/^Loading$/);
setState('unavailable');