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.

Compose retained operator and backup safety repairs with Tailwind 4

pulse-triage[bot]47ce5881aa35
diff --cc frontend-modern/src/components/Storage/__tests__/DiskDetail.test.tsx
index cfa8a0f5d0,babc7242a7..e1630ffa95
--- a/frontend-modern/src/components/Storage/__tests__/DiskDetail.test.tsx
+++ b/frontend-modern/src/components/Storage/__tests__/DiskDetail.test.tsx
@@@ -135,6 -135,33 +135,33 @@@ describe('DiskDetail', () =>
expect(screen.getByText('Reallocated Sectors')).toBeInTheDocument();
});
+ it('shows the health verdict and its reason in the drawer header', () => {
+ const disk = buildDisk();
+ disk.physicalDisk!.health = 'FAILED';
+
+ render(() => <DiskDetail disk={disk} nodes={[]} />);
+
+ const health = screen.getByTestId('disk-detail-health');
+ expect(within(health).getByText('Replace Now')).toHaveClass('text-red-700');
+ expect(within(health).getByText('Disk health has degraded to a critical state.')).toHaveClass(
+ 'min-w-0',
+ 'max-w-full',
+ 'whitespace-normal',
- 'break-words',
++ 'wrap-break-word',
+ );
+ });
+
+ it('keeps the drawer header to the verdict alone when the disk is healthy', () => {
+ const disk = buildDisk();
+ disk.physicalDisk!.health = 'PASSED';
+
+ render(() => <DiskDetail disk={disk} nodes={[]} />);
+
+ const health = screen.getByTestId('disk-detail-health');
+ expect(within(health).getByText('Healthy')).toBeInTheDocument();
+ expect(within(health).queryByText('No active disk-health issues.')).not.toBeInTheDocument();
+ });
+
it('shows an explicit overview fallback when no detail readings are available', () => {
const disk = buildDisk();
delete disk.physicalDisk!.smart;
diff --cc frontend-modern/src/components/Workloads/StackedDiskBar.tsx
index d50486f26b,74cb02dbec..90913e7afa
--- a/frontend-modern/src/components/Workloads/StackedDiskBar.tsx
+++ b/frontend-modern/src/components/Workloads/StackedDiskBar.tsx
@@@ -196,37 -198,48 +198,48 @@@ export function StackedDiskBar(props: S
onMouseEnter={state.handleMouseEnter}
onMouseLeave={state.handleMouseLeave}
>
- <div class="flex h-full items-end justify-center gap-[3px]">
- <For each={presentation().verticalBars}>
- {(bar) => (
- <div
- class="group/disk relative h-full w-[5px] shrink-0 cursor-help overflow-hidden rounded-xs bg-surface-hover ring-1 ring-transparent transition-[transform,box-shadow,ring-color] duration-100 hover:scale-y-[1.08]"
- title={bar.title}
- >
+ <div class="flex h-full items-center justify-center gap-1.5">
+ <Show when={presentation().verticalBarsLabel}>
+ <span
+ data-stacked-disk-max-label
+ class="shrink-0 text-[10px] font-semibold leading-none tabular-nums text-base-content"
+ title={presentation().verticalBarsLabelTitle}
+ >
+ {presentation().verticalBarsLabel}
+ </span>
+ </Show>
+ <div class="flex h-full items-end justify-center gap-[3px]">
+ <For each={presentation().verticalBars}>
+ {(bar) => (
<div
- data-stacked-disk-fill="vertical"
- class="absolute inset-0 rounded-xs brightness-100 transition-[filter] duration-100 group-hover/disk:brightness-125"
- class="group/disk relative h-full w-[5px] shrink-0 cursor-help overflow-hidden rounded-sm bg-surface-hover ring-1 ring-transparent transition-[transform,box-shadow,ring-color] duration-100 hover:scale-y-[1.08] hover:ring-base-content/30"
++ class="group/disk relative h-full w-[5px] shrink-0 cursor-help overflow-hidden rounded-xs bg-surface-hover ring-1 ring-transparent transition-[transform,box-shadow,ring-color] duration-100 hover:scale-y-[1.08]"
+ title={bar.title}
>
- <svg
- aria-hidden="true"
- class="absolute inset-0 h-full w-full"
- viewBox="0 0 100 100"
- preserveAspectRatio="none"
+ <div
+ data-stacked-disk-fill="vertical"
- class="absolute inset-0 rounded-sm brightness-100 transition-[filter] duration-100 group-hover/disk:brightness-125"
++ class="absolute inset-0 rounded-xs brightness-100 transition-[filter] duration-100 group-hover/disk:brightness-125"
>
- <rect
- class="metric-fill-geometry"
- x="0"
- y={invertPercent(bar.fillPercent)}
- width="100"
- height={clampPercent(bar.fillPercent)}
- rx="2"
- fill={bar.color}
- />
- </svg>
+ <svg
+ aria-hidden="true"
+ class="absolute inset-0 h-full w-full"
+ viewBox="0 0 100 100"
+ preserveAspectRatio="none"
+ >
+ <rect
+ class="metric-fill-geometry"
+ x="0"
+ y={invertPercent(bar.fillPercent)}
+ width="100"
+ height={clampPercent(bar.fillPercent)}
+ rx="2"
+ fill={bar.color}
+ />
+ </svg>
+ </div>
</div>
- </div>
- )}
- </For>
+ )}
+ </For>
+ </div>
</div>
</div>
</Show>
diff --cc frontend-modern/src/features/alerts/AlertDeliveryLogCard.tsx
index 1b7bfb411b,b45de97225..cb1be99e27
--- a/frontend-modern/src/features/alerts/AlertDeliveryLogCard.tsx
+++ b/frontend-modern/src/features/alerts/AlertDeliveryLogCard.tsx
@@@ -163,86 -189,86 +189,86 @@@ export function AlertDeliveryLogCard(pr
<p class="text-sm text-gray-600 dark:text-gray-400">
{getAlertDestinationsDeliveryLogEmpty()}
</p>
- }
- >
- <ul class="max-h-80 divide-y divide-gray-200 overflow-y-auto dark:divide-gray-700">
- <For each={rows()}>
- {(row) =>
- row.kind === 'attempt' ? (
- <li class="flex flex-col gap-1 py-2">
- <div class="flex flex-wrap items-center gap-x-3 gap-y-1">
- <span
- class={`inline-flex shrink-0 items-center rounded-full px-2 py-0.5 text-xs font-medium ${outcomeBadgeClasses[row.entry.outcome]}`}
- >
- {getAlertDeliveryLogOutcomeLabel(row.entry.outcome)}
- </span>
- <span class="min-w-0 truncate text-sm font-medium text-gray-900 dark:text-gray-100">
- {destinationLabel(row.entry)}
- </span>
- <span
- class="min-w-0 truncate text-sm text-gray-600 dark:text-gray-400"
- title={row.entry.alertIds.join(', ')}
- >
- {alertSummary(row.entry)}
- </span>
- <time
- class="ml-auto shrink-0 text-xs text-gray-500 dark:text-gray-400"
- dateTime={row.entry.timestamp}
- title={formatRelativeTime(row.entry.timestamp)}
- >
- {absoluteTimestamp(row.entry.timestamp)}
- </time>
- </div>
- <Show
- when={
- !row.entry.success && (row.entry.failureClass || row.entry.errorMessage)
- }
+ </Show>
+ }
+ >
+ <ul class="max-h-80 divide-y divide-gray-200 overflow-y-auto dark:divide-gray-700">
+ <For each={rows()}>
+ {(row) =>
+ row.kind === 'attempt' ? (
+ <li class="flex flex-col gap-1 py-2">
+ <div class="flex flex-wrap items-center gap-x-3 gap-y-1">
+ <span
- class={`inline-flex flex-shrink-0 items-center rounded-full px-2 py-0.5 text-xs font-medium ${outcomeBadgeClasses[row.entry.outcome]}`}
++ class={`inline-flex shrink-0 items-center rounded-full px-2 py-0.5 text-xs font-medium ${outcomeBadgeClasses[row.entry.outcome]}`}
+ >
+ {getAlertDeliveryLogOutcomeLabel(row.entry.outcome)}
+ </span>
+ <span class="min-w-0 truncate text-sm font-medium text-gray-900 dark:text-gray-100">
+ {destinationLabel(row.entry)}
+ </span>
+ <span
+ class="min-w-0 truncate text-sm text-gray-600 dark:text-gray-400"
+ title={row.entry.alertIds.join(', ')}
+ >
+ {alertSummary(row.entry)}
+ </span>
+ <time
- class="ml-auto flex-shrink-0 text-xs text-gray-500 dark:text-gray-400"
++ class="ml-auto shrink-0 text-xs text-gray-500 dark:text-gray-400"
+ dateTime={row.entry.timestamp}
+ title={formatRelativeTime(row.entry.timestamp)}
+ >
+ {absoluteTimestamp(row.entry.timestamp)}
+ </time>
+ </div>
+ <Show
+ when={
+ !row.entry.success && (row.entry.failureClass || row.entry.errorMessage)
+ }
+ >
+ <p class="text-xs leading-5 text-red-700 dark:text-red-300">
+ <Show when={row.entry.failureClass}>
+ {(failureClass) => (
+ <span class="font-medium">
+ {getAlertDeliveryLogFailureClassLabel(failureClass())}
+ {row.entry.errorMessage ? ': ' : ''}
+ </span>
+ )}
+ </Show>
+ {row.entry.errorMessage}
+ </p>
+ </Show>
+ </li>
+ ) : (
+ <li class="flex flex-col gap-1 py-2" title={row.event.message}>
+ <div class="flex flex-wrap items-center gap-x-3 gap-y-1">
+ <span
- class={`inline-flex flex-shrink-0 items-center rounded-full px-2 py-0.5 text-xs font-medium ${
++ class={`inline-flex shrink-0 items-center rounded-full px-2 py-0.5 text-xs font-medium ${
+ row.event.type === 'notification_deferred'
+ ? 'bg-amber-100 text-amber-800 dark:bg-amber-900/40 dark:text-amber-300'
+ : 'bg-gray-100 text-gray-600 dark:bg-gray-700/60 dark:text-gray-300'
+ }`}
+ >
+ {row.event.type === 'notification_deferred' ? 'Deferred' : 'Held'}
+ </span>
+ <span class="min-w-0 truncate text-sm font-medium text-gray-900 dark:text-gray-100">
+ {heldResourceLabel(row.event)}
+ </span>
+ <span class="min-w-0 truncate text-sm text-gray-600 dark:text-gray-400">
+ {describeAlertEventReason(row.event.reason)}
+ </span>
+ <time
- class="ml-auto flex-shrink-0 text-xs text-gray-500 dark:text-gray-400"
++ class="ml-auto shrink-0 text-xs text-gray-500 dark:text-gray-400"
+ dateTime={row.event.occurredAt}
+ title={formatRelativeTime(row.event.occurredAt)}
>
- <p class="text-xs leading-5 text-red-700 dark:text-red-300">
- <Show when={row.entry.failureClass}>
- {(failureClass) => (
- <span class="font-medium">
- {getAlertDeliveryLogFailureClassLabel(failureClass())}
- {row.entry.errorMessage ? ': ' : ''}
- </span>
- )}
- </Show>
- {row.entry.errorMessage}
- </p>
- </Show>
- </li>
- ) : (
- <li class="flex flex-col gap-1 py-2" title={row.event.message}>
- <div class="flex flex-wrap items-center gap-x-3 gap-y-1">
- <span
- class={`inline-flex shrink-0 items-center rounded-full px-2 py-0.5 text-xs font-medium ${
- row.event.type === 'notification_deferred'
- ? 'bg-amber-100 text-amber-800 dark:bg-amber-900/40 dark:text-amber-300'
- : 'bg-gray-100 text-gray-600 dark:bg-gray-700/60 dark:text-gray-300'
- }`}
- >
- {row.event.type === 'notification_deferred' ? 'Deferred' : 'Held'}
- </span>
- <span class="min-w-0 truncate text-sm font-medium text-gray-900 dark:text-gray-100">
- {heldResourceLabel(row.event)}
- </span>
- <span class="min-w-0 truncate text-sm text-gray-600 dark:text-gray-400">
- {describeAlertEventReason(row.event.reason)}
- </span>
- <time
- class="ml-auto shrink-0 text-xs text-gray-500 dark:text-gray-400"
- dateTime={row.event.occurredAt}
- title={formatRelativeTime(row.event.occurredAt)}
- >
- {absoluteTimestamp(row.event.occurredAt)}
- </time>
- </div>
- </li>
- )
- }
- </For>
- </ul>
- </Show>
+ {absoluteTimestamp(row.event.occurredAt)}
+ </time>
+ </div>
+ </li>
+ )
+ }
+ </For>
+ </ul>
</Show>
</div>
</Card>
diff --cc frontend-modern/src/features/docker/DockerServicesTable.tsx
index 08acecf103,041a334ec0..efb9d51923
--- a/frontend-modern/src/features/docker/DockerServicesTable.tsx
+++ b/frontend-modern/src/features/docker/DockerServicesTable.tsx
@@@ -354,7 -360,10 +360,10 @@@ export const DockerServicesTable: Compo
<TableCell
class={`${getPlatformTableCellClassForKind('text')} text-base-content`}
>
- <span class="truncate inline-block max-w-40" title={update().title}>
+ <span
- class="inline-block max-w-full whitespace-normal break-words leading-3 md:max-w-[10rem] md:truncate md:leading-normal"
++ class="inline-block max-w-full whitespace-normal wrap-break-word leading-3 md:max-w-40 md:truncate md:leading-normal"
+ title={update().title}
+ >
{update().label}
</span>
</TableCell>
diff --cc frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsx
index 1695ae6c76,0e34de84ec..b7f88cf332
--- a/frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsx
+++ b/frontend-modern/src/features/docker/__tests__/DockerNativeTables.test.tsx
@@@ -1512,7 -1514,12 +1514,12 @@@ describe('Docker native tables', () =>
expect(screen.getByText('replicated')).toBeInTheDocument();
expect(screen.getByText('4')).toBeInTheDocument();
expect(screen.getByText('2')).toBeInTheDocument();
- expect(screen.getByText('rollback_started')).toBeInTheDocument();
+ // The snake_case rollout token reads as words; the raw token stays in the title.
+ expect(screen.getByText('Rollback started')).toBeInTheDocument();
- expect(screen.getByText('Rollback started')).toHaveClass('whitespace-normal', 'break-words');
++ expect(screen.getByText('Rollback started')).toHaveClass('whitespace-normal', 'wrap-break-word');
+ expect(
+ screen.getByText('Rollback started').closest('[title]')?.getAttribute('title'),
+ ).toContain('rollback_started');
expect(screen.getByText('18080:8080/tcp')).toBeInTheDocument();
expect(screen.getByText('manager-1')).toBeInTheDocument();
expect(document.querySelector('[data-docker-service-row="service-1"]')).not.toBeNull();
diff --cc frontend-modern/src/features/kubernetes/KubernetesControllersTable.tsx
index 189041e54d,3b64504700..47f82717ce
--- a/frontend-modern/src/features/kubernetes/KubernetesControllersTable.tsx
+++ b/frontend-modern/src/features/kubernetes/KubernetesControllersTable.tsx
@@@ -431,9 -442,9 +442,9 @@@ export const KubernetesControllersTable
</span>
</TableCell>
<TableCell
- class={`${getPlatformTableCellClassForKind('text')} text-base-content`}
+ class={`${getPlatformTableCellClassForKind('text')} platform-table-phone-hidden text-base-content`}
>
- <span class="inline-block max-w-[12rem] truncate" title={target()}>
+ <span class="inline-block max-w-48 truncate" title={target()}>
{target()}
</span>
</TableCell>
diff --cc frontend-modern/src/features/proxmox/__tests__/proxmoxHostTableModel.test.ts
index 66ee4d61d0,305232fb26..1b587b374a
--- a/frontend-modern/src/features/proxmox/__tests__/proxmoxHostTableModel.test.ts
+++ b/frontend-modern/src/features/proxmox/__tests__/proxmoxHostTableModel.test.ts
@@@ -23,12 -23,12 +23,12 @@@ describe('proxmoxHostTableModel', () =
const columns = getProxmoxHostVisibleColumnsForLayout('phone');
const ids = columns.map((column) => column.id);
- expect(ids).toEqual(['node', 'cpu', 'memory', 'disk', 'temp', 'uptime']);
+ expect(ids).toEqual(['node', 'cpu', 'memory', 'disk', 'uptime']);
- expect(getProxmoxHostTableMinWidthClass('phone')).toBe('min-w-[0px]');
+ expect(getProxmoxHostTableMinWidthClass('phone')).toBe('min-w-0');
- expect(getProxmoxHostColumnWidthStyle('node', 'phone', ids)).toEqual({ width: '30%' });
- expect(getProxmoxHostColumnWidthStyle('disk', 'phone', ids)).toEqual({ width: '13.3824%' });
- expect(getProxmoxHostColumnWidthStyle('temp', 'phone', ids)).toEqual({ width: '15.4412%' });
- expect(getProxmoxHostColumnWidthStyle('uptime', 'phone', ids)).toEqual({ width: '14.4118%' });
+ expect(getProxmoxHostColumnWidthStyle('node', 'phone', ids)).toEqual({ width: '38%' });
+ expect(getProxmoxHostColumnWidthStyle('cpu', 'phone', ids)).toEqual({ width: '15.5%' });
+ expect(getProxmoxHostColumnWidthStyle('disk', 'phone', ids)).toEqual({ width: '15.5%' });
+ expect(getProxmoxHostColumnWidthStyle('uptime', 'phone', ids)).toEqual({ width: '15.5%' });
});
it('prioritizes live utilization columns in the mobile host table', () => {
diff --cc frontend-modern/src/features/storageBackups/__tests__/diskPresentation.test.ts
index 4d177523c1,b6823bd0f7..935bcce339
--- a/frontend-modern/src/features/storageBackups/__tests__/diskPresentation.test.ts
+++ b/frontend-modern/src/features/storageBackups/__tests__/diskPresentation.test.ts
@@@ -158,14 -160,55 +160,55 @@@ describe('diskPresentation', () =>
),
),
).toBe(true);
- expect(getPhysicalDiskColumnWidthPercent('compact', 'disk')).toBe(33);
- expect(getPhysicalDiskColumnWidthPercent('compact', 'size')).toBe(14);
- expect(getPhysicalDiskColumnWidthPercent('operational', 'life')).toBe(9);
- expect(getPhysicalDiskColumnWidthPercent('compact', 'device')).toBe(0);
+ expect(getPhysicalDiskColumnWidthStyle('compact', 'disk')).toEqual({ width: '34%' });
+ expect(getPhysicalDiskColumnWidthStyle('compact', 'temp')).toEqual({ width: '12%' });
+ expect(getPhysicalDiskColumnWidthStyle('compact', 'size')).toEqual({ width: '15%' });
+ expect(getPhysicalDiskColumnWidthStyle('operational', 'life')).toEqual({ width: '9%' });
+ expect(getPhysicalDiskColumnWidthStyle('compact', 'device')).toEqual({ width: '0%' });
expect(isPhysicalDiskColumnVisible('narrow', 'life')).toBe(false);
expect(isPhysicalDiskColumnVisible('narrow', 'temp')).toBe(true);
- expect(getPhysicalDiskColumnWidthPercent('narrow', 'disk')).toBe(40);
- expect(getPhysicalDiskColumnWidthPercent('narrow', 'size')).toBe(15);
+ expect(getPhysicalDiskColumnWidthStyle('narrow', 'disk')).toEqual({ width: '41%' });
+ expect(getPhysicalDiskColumnWidthStyle('narrow', 'temp')).toEqual({ width: '12%' });
+ expect(getPhysicalDiskColumnWidthStyle('narrow', 'size')).toEqual({ width: '16%' });
+ });
+
+ it('keeps the desktop disk column widths on the canonical weighted helper', () => {
+ const columns = [
+ 'disk',
+ 'device',
+ 'host',
+ 'role',
+ 'parent',
+ 'health',
+ 'life',
+ 'temp',
+ 'size',
+ ] as const;
+ expect(columns.map((column) => getPhysicalDiskColumnWidthStyle('full', column).width)).toEqual([
+ '19%',
+ '9%',
+ '10%',
+ '8%',
+ '12%',
+ '17%',
+ '6%',
+ '7%',
+ '12%',
+ ]);
+ });
+
+ it('sheds the shared cell padding only on the phone disk layouts', () => {
- expect(getPhysicalDiskCellPaddingClass('narrow')).toBe('!px-1');
- expect(getPhysicalDiskCellPaddingClass('compact')).toBe('!px-1');
++ expect(getPhysicalDiskCellPaddingClass('narrow')).toBe('px-1!');
++ expect(getPhysicalDiskCellPaddingClass('compact')).toBe('px-1!');
+ expect(getPhysicalDiskCellPaddingClass('basic')).toBe('');
+ expect(getPhysicalDiskCellPaddingClass('full')).toBe('');
+ });
+
+ it('shortens only the health words that cannot fit a phone health column', () => {
+ expect(getPhysicalDiskHealthCompactLabel('Needs Attention')).toBe('Attention');
+ expect(getPhysicalDiskHealthCompactLabel('Replace Now')).toBe('Replace');
+ expect(getPhysicalDiskHealthCompactLabel('Healthy')).toBe('Healthy');
+ expect(getPhysicalDiskHealthCompactLabel('Unknown')).toBe('Unknown');
});
it('detects SMART warnings from counters', () => {
diff --cc frontend-modern/src/features/storageBackups/__tests__/storagePagePresentation.test.ts
index a8971d42b9,b909d2e8f5..1a6f807595
--- a/frontend-modern/src/features/storageBackups/__tests__/storagePagePresentation.test.ts
+++ b/frontend-modern/src/features/storageBackups/__tests__/storagePagePresentation.test.ts
@@@ -56,12 -60,31 +60,31 @@@ describe('storagePagePresentation', ()
expect(isStoragePoolColumnVisible('compact', 'host')).toBe(true);
expect(isStoragePoolColumnVisible('compact', 'type')).toBe(false);
expect(isStoragePoolColumnVisible('compact', 'protection')).toBe(false);
- expect(getStoragePoolColumnWidthPercent('compact', 'name')).toBe(35);
- expect(getStoragePoolColumnWidthPercent('compact', 'usage')).toBe(25);
- expect(getStoragePoolColumnWidthPercent('compact', 'growth')).toBe(0);
+ expect(getStoragePoolColumnWidthStyle('compact', 'name')).toEqual({ width: '37%' });
+ expect(getStoragePoolColumnWidthStyle('compact', 'host')).toEqual({ width: '31.5%' });
+ expect(getStoragePoolColumnWidthStyle('compact', 'usage')).toEqual({ width: '13%' });
+ expect(getStoragePoolColumnWidthStyle('compact', 'growth')).toEqual({ width: '0%' });
expect(isStoragePoolColumnVisible('narrow', 'type')).toBe(false);
expect(isStoragePoolColumnVisible('narrow', 'protection')).toBe(false);
- expect(getStoragePoolColumnWidthPercent('narrow', 'name')).toBe(40);
- expect(getStoragePoolColumnWidthPercent('narrow', 'usage')).toBe(20);
+ expect(getStoragePoolColumnWidthStyle('narrow', 'name')).toEqual({ width: '35%' });
+ expect(getStoragePoolColumnWidthStyle('narrow', 'usage')).toEqual({ width: '13%' });
+ });
+
+ it('sheds the desktop cell gutter only on the phone pool layouts', () => {
- expect(getStoragePoolCellPaddingClass('narrow')).toBe('!px-1');
- expect(getStoragePoolCellPaddingClass('compact')).toBe('!px-1');
++ expect(getStoragePoolCellPaddingClass('narrow')).toBe('px-1!');
++ expect(getStoragePoolCellPaddingClass('compact')).toBe('px-1!');
+ expect(getStoragePoolCellPaddingClass('operational')).toBe('');
+ expect(getStoragePoolCellPaddingClass('full')).toBe('');
+ });
+
+ it('keeps the desktop pool column widths on the canonical weighted helper', () => {
+ const fullWidths = ['name', 'state', 'type', 'host', 'protection', 'usage', 'growth'].map(
+ (column) =>
+ getStoragePoolColumnWidthStyle(
+ 'full',
+ column as 'name' | 'state' | 'type' | 'host' | 'protection' | 'usage' | 'growth',
+ ).width,
+ );
+ expect(fullWidths).toEqual(['20%', '14%', '10%', '12%', '13%', '20%', '11%']);
});
});
diff --cc frontend-modern/src/features/storageBackups/diskDetailPresentation.ts
index 12cc6a8f12,449020cb8f..810daab8d7
--- a/frontend-modern/src/features/storageBackups/diskDetailPresentation.ts
+++ b/frontend-modern/src/features/storageBackups/diskDetailPresentation.ts
@@@ -78,6 -82,32 +82,32 @@@ export const getDiskDetailLiveBadgeLabe
export const getDiskDetailHistoryFallbackMessage = (): string =>
'Historical disk charts are unavailable until Pulse can resolve a stable identity for this disk.';
+ export type DiskDetailHealthPresentation = {
+ label: string;
+ summary: string;
+ tone: string;
+ };
+
+ // The drawer header carries the disk's verdict and its reason. The table row
+ // shows only the verdict word, so this is where the reason is read in full.
+ export const DISK_DETAIL_HEADER_STACK_CLASS = 'min-w-0 space-y-1';
+ export const DISK_DETAIL_HEALTH_ROW_CLASS =
+ 'flex flex-wrap items-baseline gap-x-2 gap-y-0.5 text-[11px]';
+ export const DISK_DETAIL_HEALTH_LABEL_CLASS = 'font-semibold';
+ export const DISK_DETAIL_HEALTH_SUMMARY_CLASS =
- 'min-w-0 max-w-full whitespace-normal break-words text-muted';
++ 'min-w-0 max-w-full whitespace-normal wrap-break-word text-muted';
+
+ export function getDiskDetailHealthPresentation(
+ disk: PhysicalDiskPresentationData,
+ ): DiskDetailHealthPresentation {
+ const status = getPhysicalDiskHealthStatus(disk);
+ return {
+ label: status.label,
+ summary: getPhysicalDiskHealthSummary(status),
+ tone: status.tone,
+ };
+ }
+
export function getDiskDetailAttributeCards(
disk: PhysicalDiskPresentationData,
diskTempThresholds?: MetricDisplayThresholds | null,
diff --cc frontend-modern/src/features/storageBackups/diskPresentation.ts
index 38d3516395,5d4aee37ca..563bc8c740
--- a/frontend-modern/src/features/storageBackups/diskPresentation.ts
+++ b/frontend-modern/src/features/storageBackups/diskPresentation.ts
@@@ -168,10 -174,31 +174,31 @@@ export const isPhysicalDiskColumnVisibl
columnId: PhysicalDiskTableColumnId,
): boolean => PHYSICAL_DISK_VISIBLE_COLUMNS[layout].includes(columnId);
- export const getPhysicalDiskColumnWidthPercent = (
+ export const getPhysicalDiskColumnWidthStyle = (
layout: PhysicalDiskTableLayoutMode,
columnId: PhysicalDiskTableColumnId,
- ): number => PHYSICAL_DISK_COLUMN_WIDTHS[layout][columnId] ?? 0;
+ ): JSX.CSSProperties =>
+ getPlatformTableWeightedColumnWidthStyle(
+ columnId,
+ PHYSICAL_DISK_COLUMN_WEIGHTS[layout],
+ PHYSICAL_DISK_VISIBLE_COLUMNS[layout],
+ );
+
+ // The shared table cell primitives pad every cell for desktop density. On the
+ // phone layouts that padding alone is a fifth of the row, so rendered cells
+ // and headers shed it the same way the Proxmox replication table does.
-export const PHYSICAL_DISK_PHONE_CELL_PADDING_CLASS = '!px-1';
++export const PHYSICAL_DISK_PHONE_CELL_PADDING_CLASS = 'px-1!';
+
+ export const getPhysicalDiskCellPaddingClass = (layout: PhysicalDiskTableLayoutMode): string =>
+ layout === 'narrow' || layout === 'compact' ? PHYSICAL_DISK_PHONE_CELL_PADDING_CLASS : '';
+
+ // Health words that do not fit a phone-width health column fall back to a
+ // shorter form; the full label stays in the wider projections and the detail.
+ export const getPhysicalDiskHealthCompactLabel = (label: string): string => {
+ if (label === 'Needs Attention') return 'Attention';
+ if (label === 'Replace Now') return 'Replace';
+ return label;
+ };
export const PHYSICAL_DISK_COL_DISK_CLASS = '';
export const PHYSICAL_DISK_COL_DEVICE_CLASS = '';
diff --cc frontend-modern/src/features/storageBackups/storagePagePresentation.ts
index 87652660c1,26c156fd0e..8fe7d87546
--- a/frontend-modern/src/features/storageBackups/storagePagePresentation.ts
+++ b/frontend-modern/src/features/storageBackups/storagePagePresentation.ts
@@@ -58,13 -70,27 +70,27 @@@ export const isStoragePoolColumnVisibl
columnId: StoragePoolTableColumnId,
): boolean => STORAGE_POOL_VISIBLE_COLUMNS[layout].includes(columnId);
- export const getStoragePoolColumnWidthPercent = (
+ // On phones the pool row sheds the desktop cell gutter the same way its
+ // headers (via the shared container query) and the physical-disk rows do:
+ // four cells at 12px each were 48px of a 361px row, and the measured values
+ // fit the tracks with only a pixel or two to spare.
-export const STORAGE_POOL_PHONE_CELL_PADDING_CLASS = '!px-1';
++export const STORAGE_POOL_PHONE_CELL_PADDING_CLASS = 'px-1!';
+
+ export const getStoragePoolCellPaddingClass = (layout: StoragePoolTableLayoutMode): string =>
+ layout === 'narrow' || layout === 'compact' ? STORAGE_POOL_PHONE_CELL_PADDING_CLASS : '';
+
+ export const getStoragePoolColumnWidthStyle = (
layout: StoragePoolTableLayoutMode,
columnId: StoragePoolTableColumnId,
- ): number => STORAGE_POOL_COLUMN_WIDTHS[layout][columnId] ?? 0;
+ ): JSX.CSSProperties =>
+ getPlatformTableWeightedColumnWidthStyle(
+ columnId,
+ STORAGE_POOL_COLUMN_WEIGHTS[layout],
+ STORAGE_POOL_VISIBLE_COLUMNS[layout],
+ );
const STORAGE_POOL_TABLE_HEADER_CLASS =
- 'overflow-hidden text-ellipsis whitespace-nowrap text-[10px] sm:text-[11px] lg:text-xs uppercase tracking-wider';
+ 'overflow-hidden text-ellipsis whitespace-nowrap text-[10px] lg:text-xs uppercase tracking-wider';
export const STORAGE_VIEW_OPTIONS: readonly StorageViewOption[] = [
{ value: 'pools', label: 'Storage' },