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.

Converge platform byte-size cells

rcourtmandf3177c2f06d
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index c9a267fc3b..f265821332 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -2613,10 +2613,12 @@ the same days/hours/minutes fallback.
Platform table byte-size formatting follows the same rule.
`formatPlatformTableBytesValue` owns the repeated positive-byte formatting plus
canonical empty-cell marker behavior for dense platform table cells. Docker /
-Podman native table helpers, Kubernetes node capacity cells, and TrueNAS
-system, VM, storage-topology, and protection byte cells must compose that
-helper instead of declaring local `formatBytes` wrappers, importing the generic
-formatter in table files, or reimplementing byte-unit precision there.
+Podman native storage cells, Docker / Podman engine storage-usage cells,
+Kubernetes node and storage capacity cells, Proxmox backup server, Ceph,
+coverage, and recoverable-artifact size cells, and TrueNAS system, VM,
+storage-topology, and protection byte cells must compose that helper instead
+of declaring local `formatBytes` wrappers, importing the generic formatter in
+table files, or reimplementing byte-unit precision there.
Compact platform table timestamps follow the same rule.
`PlatformTableDateTimeValue` and `formatPlatformTableDateTimeValue` own compact
date-time parsing, invalid/empty markers, optional minimum-year filtering, Intl
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index 954b50675a..640c5efa8f 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -150,6 +150,12 @@ PBS server uptime follows the same split: storage/recovery owns whether the
server uptime belongs on the backup-health row, while frontend-primitives owns
the one-unit uptime label through `formatPlatformTableUptimeValue` instead of
local `formatUptime` calls.
+PBS server memory/datastore byte labels and recoverable-artifact size labels
+follow the same split: storage/recovery owns whether memory, datastore usage,
+or artifact size is meaningful backup/recovery evidence, while
+frontend-primitives owns byte-unit presentation through
+`formatPlatformTableBytesValue` instead of direct `formatBytes` imports in
+backup table files.
Those Proxmox backup workflows own recovery semantics, source-specific
empty-state copy, and retry/filter actions, but their table empty-state frame
must compose the frontend-primitives-owned `PlatformTableEmptyState` shell
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index bf3d172ea5..676465c46b 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -246,11 +246,12 @@ backup servers, and Proxmox Mail Gateway node rows, must use
`formatPlatformTableUptimeValue` instead of recreating local
days/hours/minutes `formatUptime` helpers for dense table cells.
Platform byte-size table cells follow that boundary too: unified-resource
-consumers own whether a capacity, memory, disk, or requested-size field is the
-right source-specific value, while dense platform table cells must use
-`formatPlatformTableBytesValue` for positive byte formatting and unknown /
-non-positive empty-cell markers instead of carrying table-local `formatBytes`
-wrappers or direct generic byte-formatter imports.
+consumers own whether a capacity, memory, disk, requested-size, datastore,
+pool, or backup-artifact size field is the right source-specific value, while
+dense Docker / Podman, Kubernetes, Proxmox, and TrueNAS platform table cells
+must use `formatPlatformTableBytesValue` for positive byte formatting and
+unknown / non-positive empty-cell markers instead of carrying table-local
+`formatBytes` wrappers or direct generic byte-formatter imports.
Compact timestamp table cells follow the same boundary: unified-resource
consumers own whether `completedAt`, `startedAt`, `occurredAt`, or `observedAt`
is the right source-specific value for the row, while dense platform table
diff --git a/frontend-modern/scripts/shared-template-audit.mjs b/frontend-modern/scripts/shared-template-audit.mjs
index dc5d4ed592..f11b3e401a 100644
--- a/frontend-modern/scripts/shared-template-audit.mjs
+++ b/frontend-modern/scripts/shared-template-audit.mjs
@@ -71,6 +71,11 @@ const collectFiles = (scope, extensions) => {
};
const getAllowedPath = (entry) => (typeof entry === 'string' ? entry : entry?.path);
+const filterGuardFiles = (files, guard) => {
+ const pathIncludes = Array.isArray(guard.pathIncludes) ? guard.pathIncludes : [];
+ if (pathIncludes.length === 0) return files;
+ return files.filter((file) => pathIncludes.every((fragment) => file.includes(fragment)));
+};
for (const rule of rules) {
if (!rule.id) failures.push('registry rule is missing id');
@@ -126,7 +131,10 @@ for (const guard of patternGuards) {
const allowedPaths = new Set(allowedEntries.map(getAllowedPath).filter(Boolean));
const ignoredEntries = guard.ignoredPaths ?? [];
const ignoredPaths = new Set(ignoredEntries.map(getAllowedPath).filter(Boolean));
- const files = [...new Set(scopes.flatMap((scope) => collectFiles(scope, extensions)))].sort();
+ const files = filterGuardFiles(
+ [...new Set(scopes.flatMap((scope) => collectFiles(scope, extensions)))].sort(),
+ guard,
+ );
for (const file of files) {
if (file === guard.canonical.path) continue;
@@ -201,7 +209,10 @@ for (const guard of requiredPatternGuards) {
const allowedPaths = new Set(allowedEntries.map(getAllowedPath).filter(Boolean));
const ignoredEntries = guard.ignoredPaths ?? [];
const ignoredPaths = new Set(ignoredEntries.map(getAllowedPath).filter(Boolean));
- const files = [...new Set(scopes.flatMap((scope) => collectFiles(scope, extensions)))].sort();
+ const files = filterGuardFiles(
+ [...new Set(scopes.flatMap((scope) => collectFiles(scope, extensions)))].sort(),
+ guard,
+ );
for (const file of files) {
if (file === guard.canonical.path) continue;
diff --git a/frontend-modern/scripts/shared-template-registry.json b/frontend-modern/scripts/shared-template-registry.json
index 6ee48bb652..086e305c38 100644
--- a/frontend-modern/scripts/shared-template-registry.json
+++ b/frontend-modern/scripts/shared-template-registry.json
@@ -1360,7 +1360,13 @@
},
"requiredConsumers": [
{ "path": "src/features/docker/DockerNativeTableShared.tsx" },
+ { "path": "src/features/docker/DockerStorageUsageTable.tsx" },
{ "path": "src/features/kubernetes/KubernetesNodesTable.tsx" },
+ { "path": "src/features/kubernetes/KubernetesStorageTable.tsx" },
+ { "path": "src/features/proxmox/ProxmoxBackupServersTable.tsx" },
+ { "path": "src/features/proxmox/ProxmoxCephTable.tsx" },
+ { "path": "src/features/proxmox/ProxmoxCoverageTable.tsx" },
+ { "path": "src/features/proxmox/ProxmoxRecoverableTable.tsx" },
{ "path": "src/features/truenas/TrueNASProtectionTable.tsx" },
{ "path": "src/features/truenas/TrueNASStorageTopologyTable.tsx" },
{ "path": "src/features/truenas/TrueNASSystemsTable.tsx" },
@@ -1371,10 +1377,34 @@
"path": "src/features/docker/DockerNativeTableShared.tsx",
"patterns": ["formatBytes(value)"]
},
+ {
+ "path": "src/features/docker/DockerStorageUsageTable.tsx",
+ "patterns": ["formatBytes("]
+ },
{
"path": "src/features/kubernetes/KubernetesNodesTable.tsx",
"patterns": ["const formatBytes", "value.toFixed(value >= 100 ? 0 : value >= 10 ? 1 : 2)"]
},
+ {
+ "path": "src/features/kubernetes/KubernetesStorageTable.tsx",
+ "patterns": ["formatBytes("]
+ },
+ {
+ "path": "src/features/proxmox/ProxmoxBackupServersTable.tsx",
+ "patterns": ["formatBytes("]
+ },
+ {
+ "path": "src/features/proxmox/ProxmoxCephTable.tsx",
+ "patterns": ["formatBytes("]
+ },
+ {
+ "path": "src/features/proxmox/ProxmoxCoverageTable.tsx",
+ "patterns": ["formatBytes("]
+ },
+ {
+ "path": "src/features/proxmox/ProxmoxRecoverableTable.tsx",
+ "patterns": ["formatBytes("]
+ },
{
"path": "src/features/truenas/TrueNASProtectionTable.tsx",
"patterns": ["formatBytes(point.sizeBytes)"]
@@ -2362,8 +2392,14 @@
"path": "src/features/platformPage/sharedPlatformPage.tsx",
"export": "formatPlatformTableBytesValue"
},
- "scopes": ["src/features/docker", "src/features/kubernetes", "src/features/truenas"],
+ "scopes": [
+ "src/features/docker",
+ "src/features/kubernetes",
+ "src/features/proxmox",
+ "src/features/truenas"
+ ],
"extensions": [".tsx"],
+ "pathIncludes": ["Table"],
"allPatterns": ["const formatBytes", "value.toFixed(value >= 100 ? 0 : value >= 10 ? 1 : 2)"],
"legacyReason": "Retired migration debt. Platform table byte-size cells must use formatPlatformTableBytesValue for shared positive-byte formatting and empty-cell markers.",
"allowedPaths": [],
@@ -2382,8 +2418,14 @@
"path": "src/features/platformPage/sharedPlatformPage.tsx",
"export": "formatPlatformTableBytesValue"
},
- "scopes": ["src/features/truenas"],
+ "scopes": [
+ "src/features/docker",
+ "src/features/kubernetes",
+ "src/features/proxmox",
+ "src/features/truenas"
+ ],
"extensions": [".tsx"],
+ "pathIncludes": ["Table"],
"allPatterns": ["import { formatBytes } from '@/utils/format';", "formatBytes("],
"legacyReason": "Retired migration debt. Dense platform table byte cells must use formatPlatformTableBytesValue so positive-byte formatting and empty markers stay shared.",
"allowedPaths": [],
diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
index c7267c98d2..3fe94713cd 100644
--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
@@ -152,6 +152,7 @@ import workloadSelectionStateSource from '@/components/Workloads/useWorkloadSele
import dockerContainersTableSource from '@/features/docker/DockerContainersTable.tsx?raw';
import dockerHostsTableSource from '@/features/docker/DockerHostsTable.tsx?raw';
import dockerNativeTableSharedSource from '@/features/docker/DockerNativeTableShared.tsx?raw';
+import dockerStorageUsageTableSource from '@/features/docker/DockerStorageUsageTable.tsx?raw';
import dockerVolumesTableSource from '@/features/docker/DockerVolumesTable.tsx?raw';
import kubernetesAutoscalingTableSource from '@/features/kubernetes/KubernetesAutoscalingTable.tsx?raw';
import kubernetesClustersTableSource from '@/features/kubernetes/KubernetesClustersTable.tsx?raw';
@@ -417,6 +418,7 @@ describe('shared primitive guardrails', () => {
canonical?: { path?: string; export?: string };
allPatterns?: string[];
scopes?: string[];
+ pathIncludes?: string[];
allowedPaths?: string[];
ignoredPaths?: string[];
}>;
@@ -520,6 +522,7 @@ describe('shared primitive guardrails', () => {
canonical?: { path?: string; export?: string };
allPatterns?: string[];
scopes?: string[];
+ pathIncludes?: string[];
allowedPaths?: string[];
ignoredPaths?: string[];
}>;
@@ -760,6 +763,7 @@ describe('shared primitive guardrails', () => {
canonical?: { path?: string; export?: string };
allPatterns?: string[];
scopes?: string[];
+ pathIncludes?: string[];
allowedPaths?: string[];
ignoredPaths?: string[];
}>;
@@ -3725,6 +3729,7 @@ describe('shared primitive guardrails', () => {
canonical?: { path?: string; export?: string };
allPatterns?: string[];
scopes?: string[];
+ pathIncludes?: string[];
allowedPaths?: string[];
ignoredPaths?: string[];
}>;
@@ -3740,7 +3745,13 @@ describe('shared primitive guardrails', () => {
);
const platformByteValueConsumers: Array<[string, string]> = [
['src/features/docker/DockerNativeTableShared.tsx', dockerNativeTableSharedSource],
+ ['src/features/docker/DockerStorageUsageTable.tsx', dockerStorageUsageTableSource],
['src/features/kubernetes/KubernetesNodesTable.tsx', kubernetesNodesTableSource],
+ ['src/features/kubernetes/KubernetesStorageTable.tsx', kubernetesStorageTableSource],
+ ['src/features/proxmox/ProxmoxBackupServersTable.tsx', proxmoxBackupServersTableSource],
+ ['src/features/proxmox/ProxmoxCephTable.tsx', proxmoxCephTableSource],
+ ['src/features/proxmox/ProxmoxCoverageTable.tsx', proxmoxCoverageTableSource],
+ ['src/features/proxmox/ProxmoxRecoverableTable.tsx', proxmoxRecoverableTableSource],
['src/features/truenas/TrueNASProtectionTable.tsx', truenasProtectionTableSource],
['src/features/truenas/TrueNASStorageTopologyTable.tsx', truenasStorageTopologyTableSource],
['src/features/truenas/TrueNASSystemsTable.tsx', truenasSystemsTableSource],
@@ -3764,10 +3775,34 @@ describe('shared primitive guardrails', () => {
path: 'src/features/docker/DockerNativeTableShared.tsx',
patterns: ['formatBytes(value)'],
},
+ {
+ path: 'src/features/docker/DockerStorageUsageTable.tsx',
+ patterns: ['formatBytes('],
+ },
{
path: 'src/features/kubernetes/KubernetesNodesTable.tsx',
patterns: localFormatBytesHelperPatterns,
},
+ {
+ path: 'src/features/kubernetes/KubernetesStorageTable.tsx',
+ patterns: ['formatBytes('],
+ },
+ {
+ path: 'src/features/proxmox/ProxmoxBackupServersTable.tsx',
+ patterns: ['formatBytes('],
+ },
+ {
+ path: 'src/features/proxmox/ProxmoxCephTable.tsx',
+ patterns: ['formatBytes('],
+ },
+ {
+ path: 'src/features/proxmox/ProxmoxCoverageTable.tsx',
+ patterns: ['formatBytes('],
+ },
+ {
+ path: 'src/features/proxmox/ProxmoxRecoverableTable.tsx',
+ patterns: ['formatBytes('],
+ },
{
path: 'src/features/truenas/TrueNASProtectionTable.tsx',
patterns: ['formatBytes(point.sizeBytes)'],
@@ -3797,8 +3832,10 @@ describe('shared primitive guardrails', () => {
expect(localHelperGuard?.scopes).toEqual([
'src/features/docker',
'src/features/kubernetes',
+ 'src/features/proxmox',
'src/features/truenas',
]);
+ expect(localHelperGuard?.pathIncludes).toEqual(['Table']);
expect(localHelperGuard?.allowedPaths ?? []).toHaveLength(0);
expect(localHelperGuard?.ignoredPaths ?? []).toHaveLength(0);
expect(localFormatBytesImportGuard?.canonical?.path).toBe(
@@ -3809,7 +3846,13 @@ describe('shared primitive guardrails', () => {
"import { formatBytes } from '@/utils/format';",
'formatBytes(',
]);
- expect(localFormatBytesImportGuard?.scopes).toEqual(['src/features/truenas']);
+ expect(localFormatBytesImportGuard?.scopes).toEqual([
+ 'src/features/docker',
+ 'src/features/kubernetes',
+ 'src/features/proxmox',
+ 'src/features/truenas',
+ ]);
+ expect(localFormatBytesImportGuard?.pathIncludes).toEqual(['Table']);
expect(localFormatBytesImportGuard?.allowedPaths ?? []).toHaveLength(0);
expect(localFormatBytesImportGuard?.ignoredPaths ?? []).toHaveLength(0);
diff --git a/frontend-modern/src/features/docker/DockerStorageUsageTable.tsx b/frontend-modern/src/features/docker/DockerStorageUsageTable.tsx
index 6b9f6cbc27..c8774619a1 100644
--- a/frontend-modern/src/features/docker/DockerStorageUsageTable.tsx
+++ b/frontend-modern/src/features/docker/DockerStorageUsageTable.tsx
@@ -1,7 +1,6 @@
import { For, Show, type Component, type JSX } from 'solid-js';
import { StatusDot } from '@/components/shared/StatusDot';
import { TableCell, TableHead, TableRow } from '@/components/shared/Table';
-import { formatBytes } from '@/utils/format';
import { getSimpleStatusIndicator } from '@/utils/status';
import { asTrimmedString } from '@/utils/stringUtils';
import {
@@ -9,6 +8,7 @@ import {
PlatformTableEmptyState,
PlatformTableToolbar,
createPlatformTableFilterState,
+ formatPlatformTableBytesValue,
getPlatformTableCellClassForKind,
getPlatformTableHeadClassForKind,
PlatformTableShell,
@@ -29,9 +29,12 @@ const bucketValue = (bucket?: DockerStorageUsageMeta): JSX.Element => {
const active = bucket?.activeCount ?? 0;
return (
<span class="inline-flex min-w-0 flex-col items-end leading-tight">
- <span class="tabular-nums text-base-content">{formatBytes(totalSize)}</span>
+ <span class="tabular-nums text-base-content">
+ {formatPlatformTableBytesValue(totalSize, '0 B')}
+ </span>
<span class="truncate text-[10px] text-muted">
- {count} total, {active} active, {formatBytes(reclaimable)} reclaimable
+ {count} total, {active} active, {formatPlatformTableBytesValue(reclaimable, '0 B')}{' '}
+ reclaimable
</span>
</span>
);
diff --git a/frontend-modern/src/features/kubernetes/KubernetesStorageTable.tsx b/frontend-modern/src/features/kubernetes/KubernetesStorageTable.tsx
index c91aad1afa..a1247297cf 100644
--- a/frontend-modern/src/features/kubernetes/KubernetesStorageTable.tsx
+++ b/frontend-modern/src/features/kubernetes/KubernetesStorageTable.tsx
@@ -1,7 +1,6 @@
import { For, Show, type Component, type JSX } from 'solid-js';
import { StatusDot } from '@/components/shared/StatusDot';
import { TableCell, TableHead, TableRow } from '@/components/shared/Table';
-import { formatBytes } from '@/utils/format';
import { getSimpleStatusIndicator } from '@/utils/status';
import { asTrimmedString } from '@/utils/stringUtils';
import {
@@ -9,6 +8,7 @@ import {
PlatformTableEmptyState,
PlatformTableToolbar,
createPlatformTableFilterState,
+ formatPlatformTableBytesValue,
formatPlatformTableTextValue,
getPlatformTableCellClassForKind,
getPlatformTableHeadClassForKind,
@@ -74,12 +74,16 @@ const capacityLabel = (resource: Resource): string => {
typeof requested === 'number' &&
requested > 0
) {
- if (capacity !== requested) return `${formatBytes(capacity)} / ${formatBytes(requested)} req`;
- return formatBytes(capacity);
+ if (capacity !== requested) {
+ return `${formatPlatformTableBytesValue(capacity)} / ${formatPlatformTableBytesValue(requested)} req`;
+ }
+ return formatPlatformTableBytesValue(capacity);
+ }
+ if (typeof requested === 'number' && requested > 0) {
+ return `${formatPlatformTableBytesValue(requested)} req`;
}
- if (typeof requested === 'number' && requested > 0) return `${formatBytes(requested)} req`;
}
- if (typeof capacity === 'number' && capacity > 0) return formatBytes(capacity);
+ if (typeof capacity === 'number' && capacity > 0) return formatPlatformTableBytesValue(capacity);
return '—';
};
diff --git a/frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx
index 46aab9d956..c7da9ac490 100644
--- a/frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx
+++ b/frontend-modern/src/features/proxmox/ProxmoxBackupServersTable.tsx
@@ -2,8 +2,8 @@ import { For, Show, type JSX } from 'solid-js';
import { StatusDot } from '@/components/shared/StatusDot';
import { TableCell, TableHead, TableRow } from '@/components/shared/Table';
-import { formatBytes } from '@/utils/format';
import {
+ formatPlatformTableBytesValue,
formatPlatformTableIntegerValue,
formatPlatformTablePercentValue,
formatPlatformTableUptimeValue,
@@ -227,7 +227,7 @@ export function ProxmoxBackupServersTable(props: {
class="text-base-content"
title={
row.memoryTotal
- ? `${formatBytes(row.memoryUsed ?? 0)} / ${formatBytes(row.memoryTotal)}`
+ ? `${formatPlatformTableBytesValue(row.memoryUsed, '0 B')} / ${formatPlatformTableBytesValue(row.memoryTotal)}`
: undefined
}
>
@@ -235,7 +235,7 @@ export function ProxmoxBackupServersTable(props: {
</span>
<Show when={row.memoryTotal}>
<span class="ml-1 text-[10px] text-muted tabular-nums">
- ({formatBytes(row.memoryUsed ?? 0)}/{formatBytes(row.memoryTotal ?? 0)})
+ {`(${formatPlatformTableBytesValue(row.memoryUsed, '0 B')}/${formatPlatformTableBytesValue(row.memoryTotal)})`}
</span>
</Show>
</Show>
@@ -272,7 +272,8 @@ export function ProxmoxBackupServersTable(props: {
<PlatformTablePercentValue value={pct()} />
</span>
<span class="text-[10px] text-muted tabular-nums">
- {formatBytes(datastore().used)} / {formatBytes(datastore().total)}
+ {formatPlatformTableBytesValue(datastore().used, '0 B')} /{' '}
+ {formatPlatformTableBytesValue(datastore().total)}
</span>
</div>
)}
diff --git a/frontend-modern/src/features/proxmox/ProxmoxCephTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxCephTable.tsx
index b44598ec79..1d972b0006 100644
--- a/frontend-modern/src/features/proxmox/ProxmoxCephTable.tsx
+++ b/frontend-modern/src/features/proxmox/ProxmoxCephTable.tsx
@@ -12,10 +12,10 @@ import { InlineDetailTableRow } from '@/components/shared/InlineDetailTableRow';
import { StatusDot } from '@/components/shared/StatusDot';
import type { StatusIndicatorVariant } from '@/utils/status';
import { TableCell, TableHead, TableRow } from '@/components/shared/Table';
-import { formatBytes } from '@/utils/format';
import { asTrimmedString } from '@/utils/stringUtils';
import {
PlatformTableToolbar,
+ formatPlatformTableBytesValue,
formatPlatformTablePercentValue,
getPlatformTableCellClassForKind,
getPlatformTableHeadClassForKind,
@@ -107,7 +107,10 @@ function poolsLabel(resource: Resource): JSX.Element {
return (
<span class="tabular-nums">
{pools.length}
- <span class="text-muted text-[10px]"> · {formatBytes(stored)} stored</span>
+ <span class="text-muted text-[10px]">
+ {' · '}
+ {formatPlatformTableBytesValue(stored, '0 B')} stored
+ </span>
</span>
);
}
@@ -151,7 +154,7 @@ function capacityLabel(resource: Resource): JSX.Element {
return (
<span class="tabular-nums">
{formatPlatformTablePercentValue(pct)}
- <span class="text-muted text-[10px]"> of {formatBytes(total)}</span>
+ <span class="text-muted text-[10px]"> of {formatPlatformTableBytesValue(total)}</span>
</span>
);
}
diff --git a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx
index 0920851c17..fd3a868458 100644
--- a/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx
+++ b/frontend-modern/src/features/proxmox/ProxmoxCoverageTable.tsx
@@ -3,8 +3,8 @@ import { For, Show, type Accessor, type JSX } from 'solid-js';
import { InlineDetailTableRow } from '@/components/shared/InlineDetailTableRow';
import { StatusDot } from '@/components/shared/StatusDot';
import { TableCell, TableRow } from '@/components/shared/Table';
-import { formatBytes } from '@/utils/format';
import {
+ formatPlatformTableBytesValue,
getPlatformTableCellClassForKind,
getPlatformTableHeadClassForKind,
PlatformTableEmptyState,
@@ -413,7 +413,7 @@ export function ProxmoxCoverageTable(props: {
when={artifact.size && artifact.size > 0}
fallback={<span class="text-muted">No size</span>}
>
- {formatBytes(artifact.size ?? 0)}
+ {formatPlatformTableBytesValue(artifact.size)}
</Show>
</td>
<td class="px-2 py-1">
diff --git a/frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsx
index adc6778a4f..e15dfadeb4 100644
--- a/frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsx
+++ b/frontend-modern/src/features/proxmox/ProxmoxRecoverableTable.tsx
@@ -1,12 +1,12 @@
import { For, Show, type Accessor, type JSX } from 'solid-js';
import { TableCell, TableHead, TableRow } from '@/components/shared/Table';
-import { formatBytes } from '@/utils/format';
import {
getRecoveryFullDateLabel,
recoveryDateKeyFromTimestamp,
} from '@/utils/recoveryDatePresentation';
import {
+ formatPlatformTableBytesValue,
getPlatformTableCellClassForKind,
getPlatformTableHeadClassForKind,
PlatformTableEmptyState,
@@ -115,8 +115,8 @@ export function ProxmoxRecoverableTable(props: {
: 0
}
fillClass="bg-blue-500/40 dark:bg-blue-500/40"
- label={formatBytes(artifact.size ?? 0)}
- tooltip={`${formatBytes(artifact.size ?? 0)} (relative to largest artifact in view)`}
+ label={formatPlatformTableBytesValue(artifact.size)}
+ tooltip={`${formatPlatformTableBytesValue(artifact.size)} (relative to largest artifact in view)`}
/>
</Show>
</TableCell>
diff --git a/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupsTableShared.test.tsx b/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupsTableShared.test.tsx
index 6de006f4fe..f05ea3cb6c 100644
--- a/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupsTableShared.test.tsx
+++ b/frontend-modern/src/features/proxmox/__tests__/proxmoxBackupsTableShared.test.tsx
@@ -1,6 +1,9 @@
import { afterEach, describe, expect, it } from 'vitest';
import { cleanup, render, screen } from '@solidjs/testing-library';
import { WorkloadTypeBadge } from '@/components/shared/WorkloadTypeBadge';
+import proxmoxBackupServersTableSource from '../ProxmoxBackupServersTable.tsx?raw';
+import proxmoxCoverageTableSource from '../ProxmoxCoverageTable.tsx?raw';
+import proxmoxRecoverableTableSource from '../ProxmoxRecoverableTable.tsx?raw';
import proxmoxBackupsTableSharedSource from '../proxmoxBackupsTableShared.tsx?raw';
import {
ArtifactSourceBadge,
@@ -68,6 +71,19 @@ describe('proxmoxBackupsTableShared', () => {
/inline-flex items-center rounded-sm px-1\.5 py-0\.5 text-\[10px\] font-semibold/,
);
});
+
+ it('keeps backup byte-size cells on the shared platform table formatter', () => {
+ const sources = [
+ proxmoxBackupServersTableSource,
+ proxmoxCoverageTableSource,
+ proxmoxRecoverableTableSource,
+ ];
+
+ for (const source of sources) {
+ expect(source).toContain('formatPlatformTableBytesValue');
+ expect(source).not.toContain('formatBytes(');
+ }
+ });
});
function artifact(overrides: Partial<RecoverableArtifact> = {}): RecoverableArtifact {