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.

Use the same text-only size choice in both Coverage projections

pulse-triage[bot]ec889172d463
diff --git a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx
index 6815eaad5e..2993e7fbbd 100644
--- a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx
+++ b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx
@@ -1093,14 +1093,11 @@ export function ProxmoxCoverageTable(props: {
<TableCell
class={`${getPlatformTableCellClassForKind('numeric-value')} tabular-nums text-base-content`}
>
- <Show
- when={artifact.size && artifact.size > 0}
- fallback={
- <span class="text-muted">Unknown size</span>
- }
- >
- {formatPlatformTableBytesValue(artifact.size)}
- </Show>
+ {artifact.size && artifact.size > 0 ? (
+ formatPlatformTableBytesValue(artifact.size)
+ ) : (
+ <span class="text-muted">Unknown size</span>
+ )}
</TableCell>
</Show>
<TableCell
diff --git a/frontend-modern/src/features/proxmox/__tests__/coverageRestorePointIdentity.test.tsx b/frontend-modern/src/features/proxmox/__tests__/coverageRestorePointIdentity.test.tsx
index 80eed34714..e5ad3ad7f2 100644
--- a/frontend-modern/src/features/proxmox/__tests__/coverageRestorePointIdentity.test.tsx
+++ b/frontend-modern/src/features/proxmox/__tests__/coverageRestorePointIdentity.test.tsx
@@ -29,7 +29,7 @@ let updated: boolean;
function inventories() {
return {
backups: [
- identityPBS({ id: 'same-time-pbs-a', namespace: 'east' }),
+ identityPBS({ id: 'same-time-pbs-a', namespace: 'east', size: updated ? 0 : 2048 }),
identityPBS({
id: 'same-time-pbs-b',
namespace: 'east',
@@ -163,6 +163,10 @@ describe('Coverage restore-point identity through parsed inventory', () => {
expect(panel).not.toHaveTextContent('second snapshot');
expect(panel).toHaveTextContent(`updated ${literal}`);
expect(panel).toHaveTextContent('2 PBS files');
+ const pbsRow = evidenceRows(panel).find((row) =>
+ row.textContent?.includes('Identifier: same-time-pbs-a'),
+ )!;
+ expect(pbsRow).toHaveTextContent('Unknown size');
expect(panel.querySelector('img')).toBeNull();
expect(screen.getByTestId('proxmox-coverage-detail')).toBe(panel);
expect(evidenceRows(panel)).toEqual(before);