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.

Fix desktop drawer detail alignment

rcourtman636367e96ee9
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 6b8ab678e1..41a3ccf075 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -1218,6 +1218,14 @@ not a replacement status card, CTA band, or page-local nested card.
`bg-surface p-3 shadow-sm` frame must be composed through
`InfoCardFrame`, `getInfoCardFrameClass`, or `INFO_CARD_FRAME_CLASS` rather
than copied as a page-local class string.
+ Compact label/value facts inside those frames belong to
+ `InfoCardKeyValueRow`. The shared row preserves endpoint alignment on
+ phones, then switches to a fixed 7rem label track with the value immediately
+ adjacent and left aligned on wider viewports. Consumers may opt into the
+ `sm` transition when their own card grid already splits at that breakpoint;
+ otherwise the shared `lg` transition is canonical. Feature surfaces own the
+ labels, values, wrapping, and selection behavior, but must not restore
+ drawer-width `justify-between` rows on desktop.
Read-only metadata chips belong to `MetadataBadge` and domain wrappers over
it. Organization role and share-status chips must use
`OrganizationRoleBadge` and `OrganizationShareStatusBadge`, so role/status
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index d9642eb5ad..122824f2cf 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -3315,9 +3315,11 @@ report inside the row expansion so degraded pools name the failing device and
running scrub/resilver without re-promoting per-device noise into table rows.
The pool detail key/value rows span the full Configuration card below the
small-screen breakpoint, then return to the two-column desktop grid. Labels
-stay fixed while long node, content, and provider values wrap inside a
-right-aligned value region, so narrow row expansions never concatenate one
-field with the next or overflow the drawer.
+stay fixed while long node, content, and provider values wrap. Phones retain
+the compact endpoint alignment, while the desktop grid uses the shared 7rem
+label track and places each left-aligned value immediately beside its label,
+so wide drawers remain easy to scan and narrow row expansions never
+concatenate one field with the next or overflow the drawer.
The pools table must not double-list Ceph-backed storage. Cluster-internal
pool rows synthesized from Ceph cluster telemetry (`models.StorageFromCephPool`:
type `ceph` homed on the `cluster` pseudo-node) are consolidated into the PVE
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index 4ff2140655..00cff987b0 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -1324,6 +1324,11 @@ is a frontend-primitives boundary. `ResourceDetailDrawerOverviewTab.tsx`,
`ResourceActionHistory.tsx`, and `DiscoveryTab.tsx` must compose
`InfoCardFrame` for that shell instead of restoring local card-frame
classes.
+Machine and host overview cards that render compact system, hardware, disk,
+and temperature facts must also compose the frontend-primitives
+`InfoCardKeyValueRow`. Mobile rows retain their condensed endpoint layout;
+desktop rows use the shared fixed label track so labels and values remain
+visually adjacent instead of spanning the full drawer width.
Curated technical inventory follows the shared compact-row contract instead
of the secondary-card contract. Docker-host drawers must project system,
runtime, memory, storage, and telemetry facts through
diff --git a/frontend-modern/browser-verification.json b/frontend-modern/browser-verification.json
index 1eef1e114b..a79b4887d2 100644
--- a/frontend-modern/browser-verification.json
+++ b/frontend-modern/browser-verification.json
@@ -1,55 +1,43 @@
{
"version": 1,
- "base_sha": "5f6bfefa5603adc16c349115b8f453c8430ddce3",
- "verified_at": "2026-08-27T18:39:55Z",
+ "base_sha": "e0baecc418d15a6638ef80ed1e2b39d08aa9a5ad",
+ "verified_at": "2026-08-27T18:57:57Z",
"result": "passed",
"changed_paths": [
- "frontend-modern/src/features/alerts/AlertEscalationSection.tsx",
- "frontend-modern/src/features/alerts/AlertsConfigurationSurface.tsx",
- "frontend-modern/src/features/alerts/alertsConfigurationModel.ts",
- "frontend-modern/src/features/alerts/helpers.ts",
- "frontend-modern/src/features/alerts/tabs/ScheduleTab.tsx",
- "frontend-modern/src/features/alerts/types.ts",
- "frontend-modern/src/features/alerts/useAlertDestinationsState.ts",
- "frontend-modern/src/features/alerts/useAlertDestinationsTabState.ts",
- "frontend-modern/src/features/alerts/useAlertScheduleState.ts",
- "frontend-modern/src/features/alerts/useAlertWebhookDestinationsState.ts",
- "frontend-modern/src/features/alerts/useAlertsConfigurationSnapshotState.ts",
- "frontend-modern/src/features/alerts/useAlertsConfigurationState.ts",
- "frontend-modern/src/types/alerts.ts",
- "frontend-modern/src/utils/alertConfigPresentation.ts"
+ "frontend-modern/src/components/Storage/StorageDetailKeyValueRow.tsx",
+ "frontend-modern/src/components/shared/InfoCardFrame.tsx",
+ "frontend-modern/src/components/shared/cards/DisksCard.tsx",
+ "frontend-modern/src/components/shared/cards/HardwareCard.tsx",
+ "frontend-modern/src/components/shared/cards/RootDiskCard.tsx",
+ "frontend-modern/src/components/shared/cards/SystemInfoCard.tsx",
+ "frontend-modern/src/components/shared/cards/TemperaturesCard.tsx",
+ "frontend-modern/src/features/storageBackups/detailPresentation.ts"
],
"content_sha256": {
- "frontend-modern/src/features/alerts/AlertEscalationSection.tsx": "f4b12a0f7d5da49961ac952b94963d61a1b1f59bc3234ed7e961c9d264139021",
- "frontend-modern/src/features/alerts/AlertsConfigurationSurface.tsx": "c514dd4b9f769c58af9af4fa5fcf647163224c85e6c4e640969a34c1d3b24708",
- "frontend-modern/src/features/alerts/alertsConfigurationModel.ts": "855189aaf23c66b14ac43a1b7b0101e7fc0d59348a09415971a16a276f083f7f",
- "frontend-modern/src/features/alerts/helpers.ts": "6ba556d57241fc7d7bfff7218d0dd924eaaeb9507f73ccda62204def14c3be61",
- "frontend-modern/src/features/alerts/tabs/ScheduleTab.tsx": "7e5fa374edf72de0b9216f672cd179c183d348e22f087827c478bb29170ba9cf",
- "frontend-modern/src/features/alerts/types.ts": "9b7c4331ac52f06d889fcdd02e75a95b247945cea6036a10e6fbea30e55d1eca",
- "frontend-modern/src/features/alerts/useAlertDestinationsState.ts": "abf1a8c0acd32fbc4a1c7177dca213edee817b637af953c0f5a5ec275d41a600",
- "frontend-modern/src/features/alerts/useAlertDestinationsTabState.ts": "e9b2cabfaa1720ab430c410fdb269a164710478bcef775a5d163f69cc3965226",
- "frontend-modern/src/features/alerts/useAlertScheduleState.ts": "fc439f16c0b79bfa6c01a74a3359ae0cb58e5765c074d75107c1ba8bd763cf31",
- "frontend-modern/src/features/alerts/useAlertWebhookDestinationsState.ts": "ee7a5d6c75902ab66a92ca0292b367bc02ba8dd268cab1e011fe719d09251fa9",
- "frontend-modern/src/features/alerts/useAlertsConfigurationSnapshotState.ts": "af9014e6d93b0aa22399470efa00f8e048df7fbe54559092d8749b3fcf5bb43a",
- "frontend-modern/src/features/alerts/useAlertsConfigurationState.ts": "20d61b9a97180d56aa6cef8445ba9d53e7043a22cc4020e6f72b505ed0c38fe7",
- "frontend-modern/src/types/alerts.ts": "24999c6668c262214fcd3b8a92b09e7a68cab2163b8a4876780ce1148d9064cf",
- "frontend-modern/src/utils/alertConfigPresentation.ts": "82d04fb6ce0c209fa968b1dabf19333dffae5a7317441a8a2cac5cfda86b831c"
+ "frontend-modern/src/components/Storage/StorageDetailKeyValueRow.tsx": "db827a709c0f018c24dd0821ae9845022a2ba15c7052b6471926957aafdf6270",
+ "frontend-modern/src/components/shared/InfoCardFrame.tsx": "0819bce063e2caf72ffbbd3beb398fd4776a7fe089da7eac5c899bd92fffe66c",
+ "frontend-modern/src/components/shared/cards/DisksCard.tsx": "f9721f90d6b1c1a7030bbc1767c90a4d353d8c4a82843e47ad37aae8f687c46d",
+ "frontend-modern/src/components/shared/cards/HardwareCard.tsx": "66df4609cc019cf5a7d0928abb82a2ad88f99683cd277ee1f0e38b9b48d281dc",
+ "frontend-modern/src/components/shared/cards/RootDiskCard.tsx": "48a1698a5781639a2fcb027837edc6c7b580e392b37041c89911f23c71d80fc6",
+ "frontend-modern/src/components/shared/cards/SystemInfoCard.tsx": "723fab36dbd6eeaf882f6eb89d2d0c7c276f5b930c17bfcbc44413a13f531880",
+ "frontend-modern/src/components/shared/cards/TemperaturesCard.tsx": "f91cecf1de23abec0b7b571b02516643206ba2b27f7cb37cd8b941f2588229dd",
+ "frontend-modern/src/features/storageBackups/detailPresentation.ts": "6dd2da6052aa37e6cfe2488356a296c578c26f7aed3ee8e49f6a5362135b34e7"
},
- "routes": ["/alerts/schedule"],
+ "routes": ["/standalone/machines", "/proxmox/storage"],
"viewports": [
{ "width": 1920, "height": 800 },
{ "width": 390, "height": 844 }
],
"states": [
- "escalation enabled with one level and the unsaved-changes guard visible",
- "exact Email selected while Apprise is unselected and both disabled states remain explicit",
- "repeat critical escalation enabled with a 30 minute interval"
+ "Apollo-114 expanded with Platform details and Machine details visible",
+ "west-f-service-pool expanded with Configuration and ZFS Pool cards visible"
],
"interactions": [
- "enabled escalation and added a level without saving the live configuration",
- "confirmed exact destination selection updates independently and never broadens to another destination",
- "confirmed repeat-until-ack exposes its bounded interval and stop-condition guidance",
- "confirmed the 390x844 schedule layout has zero horizontal overflow",
- "confirmed no browser console errors on the exercised route"
+ "expanded the Apollo-114 row, opened Platform details, and revealed the nested Machine details",
+ "confirmed System, Hardware, Disks, and temperature facts use an adjacent fixed label track at 1920px",
+ "confirmed machine facts retain condensed right-aligned values and clean wrapping at 390px",
+ "expanded west-f-service-pool and confirmed Configuration values sit adjacent to their labels at 1920px",
+ "confirmed storage Configuration values retain condensed right alignment and clean wrapping at 390px",
+ "reloaded the phone machine route and repeated the complete disclosure interaction"
]
}
diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.service-cards.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.service-cards.test.tsx
index de3c6af0ef..e702469b1c 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.service-cards.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.service-cards.test.tsx
@@ -258,6 +258,12 @@ describe('ResourceDetailDrawer service cards', () => {
expect(hostDetails.getByText('Debian GNU/Linux 13')).toBeInTheDocument();
expect(hostDetails.getByText('eno1')).toBeInTheDocument();
expect(hostDetails.getByText('192.0.2.10')).toBeInTheDocument();
+ expect(hostDetails.getByText('Hostname').parentElement).toHaveClass(
+ 'justify-between',
+ 'lg:grid',
+ 'lg:grid-cols-[7rem_minmax(0,1fr)]',
+ );
+ expect(hostDetails.getByText('pbs-bare-metal')).toHaveClass('text-right', 'lg:text-left');
});
it('renders PMG card with compact summary and queue/mail breakdown sections', () => {
diff --git a/frontend-modern/src/components/Storage/StorageDetailKeyValueRow.tsx b/frontend-modern/src/components/Storage/StorageDetailKeyValueRow.tsx
index ee7fcbc82f..6661c8ed6e 100644
--- a/frontend-modern/src/components/Storage/StorageDetailKeyValueRow.tsx
+++ b/frontend-modern/src/components/Storage/StorageDetailKeyValueRow.tsx
@@ -1,7 +1,7 @@
import type { Component } from 'solid-js';
+import { InfoCardKeyValueRow } from '@/components/shared/InfoCardFrame';
import {
STORAGE_DETAIL_KEY_CLASS,
- STORAGE_DETAIL_KEY_VALUE_ROW_CLASS,
STORAGE_DETAIL_VALUE_CLASS,
} from '@/features/storageBackups/detailPresentation';
@@ -11,14 +11,15 @@ type StorageDetailKeyValueRowProps = {
};
export const StorageDetailKeyValueRow: Component<StorageDetailKeyValueRowProps> = (props) => (
- <div
- class={`${STORAGE_DETAIL_KEY_VALUE_ROW_CLASS} col-span-2 min-w-0 items-start gap-3 sm:col-span-1`}
- >
- <span class={`${STORAGE_DETAIL_KEY_CLASS} shrink-0`}>{props.label}</span>
- <span class={`${STORAGE_DETAIL_VALUE_CLASS} min-w-0 break-words text-right`}>
- {props.value}
- </span>
- </div>
+ <InfoCardKeyValueRow
+ class="col-span-2 sm:col-span-1"
+ desktopAt="sm"
+ label={props.label}
+ labelClass={STORAGE_DETAIL_KEY_CLASS}
+ value={props.value}
+ valueClass={`${STORAGE_DETAIL_VALUE_CLASS} break-words`}
+ valueTitle={props.value}
+ />
);
export default StorageDetailKeyValueRow;
diff --git a/frontend-modern/src/components/Storage/__tests__/StoragePoolDetail.test.tsx b/frontend-modern/src/components/Storage/__tests__/StoragePoolDetail.test.tsx
index 545637b067..8912d5e4e1 100644
--- a/frontend-modern/src/components/Storage/__tests__/StoragePoolDetail.test.tsx
+++ b/frontend-modern/src/components/Storage/__tests__/StoragePoolDetail.test.tsx
@@ -138,7 +138,7 @@ describe('StoragePoolDetail', () => {
);
});
- it('stacks key-value rows on narrow drawers and wraps long values', () => {
+ it('keeps the mobile split row and moves desktop values beside a fixed label track', () => {
render(() => (
<table>
<tbody>
@@ -154,11 +154,20 @@ describe('StoragePoolDetail', () => {
));
const nodeLabel = screen.getByText('Node');
- expect(nodeLabel.parentElement).toHaveClass('col-span-2', 'sm:col-span-1', 'min-w-0', 'gap-3');
+ expect(nodeLabel.parentElement).toHaveClass(
+ 'col-span-2',
+ 'sm:col-span-1',
+ 'min-w-0',
+ 'gap-3',
+ 'justify-between',
+ 'sm:grid',
+ 'sm:grid-cols-[7rem_minmax(0,1fr)]',
+ );
expect(screen.getByText('London Edge Standalone')).toHaveClass(
'min-w-0',
'break-words',
'text-right',
+ 'sm:text-left',
);
});
diff --git a/frontend-modern/src/components/shared/InfoCardFrame.test.tsx b/frontend-modern/src/components/shared/InfoCardFrame.test.tsx
index fc743a8479..f87fbe1fa4 100644
--- a/frontend-modern/src/components/shared/InfoCardFrame.test.tsx
+++ b/frontend-modern/src/components/shared/InfoCardFrame.test.tsx
@@ -1,6 +1,11 @@
import { cleanup, render, screen } from '@solidjs/testing-library';
import { afterEach, describe, expect, it } from 'vitest';
-import { InfoCardFrame, getInfoCardFrameClass } from './InfoCardFrame';
+import {
+ InfoCardFrame,
+ InfoCardKeyValueRow,
+ getInfoCardFrameClass,
+ getInfoCardKeyValueRowClass,
+} from './InfoCardFrame';
describe('InfoCardFrame', () => {
afterEach(() => {
@@ -43,4 +48,33 @@ describe('InfoCardFrame', () => {
expect(getInfoCardFrameClass({ class: 'text-center' })).toContain('text-center');
expect(getInfoCardFrameClass()).toContain('bg-surface');
});
+
+ it('keeps values condensed on mobile and adjacent to a fixed label track on desktop', () => {
+ render(() => (
+ <InfoCardKeyValueRow
+ data-testid="row"
+ label="Hostname"
+ value="apollo-114"
+ valueTitle="Full hostname"
+ />
+ ));
+
+ const row = screen.getByTestId('row');
+ const value = screen.getByText('apollo-114');
+
+ expect(row).toHaveClass('justify-between');
+ expect(row).toHaveClass('lg:grid');
+ expect(row).toHaveClass('lg:grid-cols-[7rem_minmax(0,1fr)]');
+ expect(value).toHaveClass('text-right');
+ expect(value).toHaveClass('lg:text-left');
+ expect(value).toHaveAttribute('title', 'Full hostname');
+ });
+
+ it('can align values from the small breakpoint for compact split-card layouts', () => {
+ expect(getInfoCardKeyValueRowClass({ desktopAt: 'sm' })).toContain('sm:grid');
+ expect(getInfoCardKeyValueRowClass({ desktopAt: 'sm' })).toContain(
+ 'sm:grid-cols-[7rem_minmax(0,1fr)]',
+ );
+ expect(getInfoCardKeyValueRowClass({ desktopAt: 'sm' })).not.toContain('lg:grid');
+ });
});
diff --git a/frontend-modern/src/components/shared/InfoCardFrame.tsx b/frontend-modern/src/components/shared/InfoCardFrame.tsx
index d7eee868c7..6ff37c0edc 100644
--- a/frontend-modern/src/components/shared/InfoCardFrame.tsx
+++ b/frontend-modern/src/components/shared/InfoCardFrame.tsx
@@ -4,16 +4,88 @@ export interface InfoCardFrameProps extends Omit<JSX.HTMLAttributes<HTMLDivEleme
class?: string;
}
+export interface InfoCardKeyValueRowProps extends Omit<
+ JSX.HTMLAttributes<HTMLDivElement>,
+ 'class' | 'children'
+> {
+ label: JSX.Element;
+ value: JSX.Element;
+ class?: string;
+ labelClass?: string;
+ labelTitle?: string;
+ valueClass?: string;
+ valueTitle?: string;
+ desktopAt?: 'sm' | 'lg';
+}
+
export const INFO_CARD_FRAME_CLASS = 'rounded border border-border bg-surface p-3 shadow-sm';
+export const INFO_CARD_KEY_VALUE_ROW_CLASS = 'flex min-w-0 items-start justify-between gap-3';
+
+const INFO_CARD_KEY_VALUE_ROW_DESKTOP_CLASS = {
+ sm: 'sm:grid sm:grid-cols-[7rem_minmax(0,1fr)] sm:justify-normal',
+ lg: 'lg:grid lg:grid-cols-[7rem_minmax(0,1fr)] lg:justify-normal',
+} as const;
+
+const INFO_CARD_KEY_VALUE_VALUE_DESKTOP_CLASS = {
+ sm: 'sm:text-left',
+ lg: 'lg:text-left',
+} as const;
+
export function getInfoCardFrameClass(props: { class?: string } = {}): string {
return [INFO_CARD_FRAME_CLASS, props.class ?? ''].filter(Boolean).join(' ');
}
+export function getInfoCardKeyValueRowClass(
+ props: Pick<InfoCardKeyValueRowProps, 'class' | 'desktopAt'> = {},
+): string {
+ const desktopAt = props.desktopAt ?? 'lg';
+ return [
+ INFO_CARD_KEY_VALUE_ROW_CLASS,
+ INFO_CARD_KEY_VALUE_ROW_DESKTOP_CLASS[desktopAt],
+ props.class ?? '',
+ ]
+ .filter(Boolean)
+ .join(' ');
+}
+
export function InfoCardFrame(props: InfoCardFrameProps): JSX.Element {
const [local, rest] = splitProps(props, ['class']);
return <div {...rest} class={getInfoCardFrameClass({ class: local.class })} />;
}
+export function InfoCardKeyValueRow(props: InfoCardKeyValueRowProps): JSX.Element {
+ const [local, rest] = splitProps(props, [
+ 'class',
+ 'desktopAt',
+ 'label',
+ 'labelClass',
+ 'labelTitle',
+ 'value',
+ 'valueClass',
+ 'valueTitle',
+ ]);
+ const desktopAt = local.desktopAt ?? 'lg';
+
+ return (
+ <div {...rest} class={getInfoCardKeyValueRowClass(local)}>
+ <span
+ class={`min-w-0 shrink-0 text-muted ${local.labelClass ?? ''}`}
+ title={local.labelTitle}
+ >
+ {local.label}
+ </span>
+ <span
+ class={`min-w-0 text-right font-medium text-base-content ${
+ INFO_CARD_KEY_VALUE_VALUE_DESKTOP_CLASS[desktopAt]
+ } ${local.valueClass ?? ''}`}
+ title={local.valueTitle}
+ >
+ {local.value}
+ </span>
+ </div>
+ );
+}
+
export default InfoCardFrame;
diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
index 118f01e34c..a74750013c 100644
--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
@@ -1204,6 +1204,9 @@ describe('shared primitive guardrails', () => {
expect(infoCardFrameSource).toContain('INFO_CARD_FRAME_CLASS');
expect(infoCardFrameSource).toContain(retiredFrameClass);
expect(infoCardFrameSource).toContain('getInfoCardFrameClass');
+ expect(infoCardFrameSource).toContain('INFO_CARD_KEY_VALUE_ROW_CLASS');
+ expect(infoCardFrameSource).toContain('getInfoCardKeyValueRowClass');
+ expect(infoCardFrameSource).toContain("desktopAt?: 'sm' | 'lg'");
for (const consumerPath of expectedConsumers) {
const source = readFrontendSource(consumerPath);
@@ -1217,6 +1220,19 @@ describe('shared primitive guardrails', () => {
expect(readFrontendSource('src/features/storageBackups/detailPresentation.ts')).toContain(
'INFO_CARD_FRAME_CLASS',
);
+
+ for (const consumerPath of [
+ 'src/components/Storage/StorageDetailKeyValueRow.tsx',
+ 'src/components/shared/cards/DisksCard.tsx',
+ 'src/components/shared/cards/HardwareCard.tsx',
+ 'src/components/shared/cards/RootDiskCard.tsx',
+ 'src/components/shared/cards/SystemInfoCard.tsx',
+ 'src/components/shared/cards/TemperaturesCard.tsx',
+ ]) {
+ const source = readFrontendSource(consumerPath);
+ expect(source).toContain('InfoCardKeyValueRow');
+ expect(source).not.toContain('flex items-center justify-between');
+ }
});
it('keeps shared subtabs as one primitive and leaves shell styling to owning surfaces', () => {
diff --git a/frontend-modern/src/components/shared/cards/DisksCard.tsx b/frontend-modern/src/components/shared/cards/DisksCard.tsx
index 8577f09cc6..cffd2d9b21 100644
--- a/frontend-modern/src/components/shared/cards/DisksCard.tsx
+++ b/frontend-modern/src/components/shared/cards/DisksCard.tsx
@@ -2,7 +2,7 @@ import { Component, For, Show } from 'solid-js';
import { Disk } from '@/types/api';
import { formatBytes, type NormalizedDisk } from '@/utils/format';
import { getMetricColorRgba, getMetricTextColorClass } from '@/utils/metricThresholds';
-import { InfoCardFrame } from '@/components/shared/InfoCardFrame';
+import { InfoCardFrame, InfoCardKeyValueRow } from '@/components/shared/InfoCardFrame';
import { StackedDiskBar } from '@/components/Workloads/StackedDiskBar';
interface DisksCardProps {
@@ -37,14 +37,12 @@ export const DisksCard: Component<DisksCardProps> = (props) => {
<Show when={aggregateDisk()}>
{(aggregate) => (
<div class="mb-3 space-y-1.5 border-b border-border pb-3" data-testid="disks-card-total">
- <div class="flex justify-between gap-2 text-[10px]">
- <span class="text-muted">Total Usage</span>
- <span
- class={`font-medium ${getMetricTextColorClass(aggregateUsagePercent(), 'disk')}`}
- >
- {formatBytes(aggregate().used)} / {formatBytes(aggregate().total)}
- </span>
- </div>
+ <InfoCardKeyValueRow
+ class="text-[10px]"
+ label="Total Usage"
+ value={`${formatBytes(aggregate().used)} / ${formatBytes(aggregate().total)}`}
+ valueClass={getMetricTextColorClass(aggregateUsagePercent(), 'disk')}
+ />
<StackedDiskBar disks={props.disks} aggregateDisk={aggregate()} mode="aggregate" />
</div>
)}
@@ -59,18 +57,21 @@ export const DisksCard: Component<DisksCardProps> = (props) => {
const textColor = getMetricTextColorClass(usagePercent, 'disk');
return (
<div class="text-[10px]">
- <div class="flex justify-between mb-0.5">
- <span class="text-muted truncate max-w-[100px]" title={disk.mountpoint}>
- {disk.mountpoint}
- </span>
- <span class="flex items-center gap-1.5">
- <span class={`font-medium ${textColor}`}>{usagePercent.toFixed(0)}%</span>
- <span class="text-muted">·</span>
- <span class="text-muted">
- {formatBytes(used)} / {formatBytes(total)}
+ <InfoCardKeyValueRow
+ class="mb-0.5 text-[10px]"
+ label={disk.mountpoint}
+ labelClass="truncate"
+ labelTitle={disk.mountpoint}
+ value={
+ <span class="flex items-center gap-1.5">
+ <span class={`font-medium ${textColor}`}>{usagePercent.toFixed(0)}%</span>
+ <span class="text-muted">·</span>
+ <span class="text-muted">
+ {formatBytes(used)} / {formatBytes(total)}
+ </span>
</span>
- </span>
- </div>
+ }
+ />
<div class="h-1.5 w-full rounded-full bg-surface-hover overflow-hidden">
<div
class="h-full rounded-full transition-all duration-500"
diff --git a/frontend-modern/src/components/shared/cards/HardwareCard.tsx b/frontend-modern/src/components/shared/cards/HardwareCard.tsx
index bc2de0640b..808fc37a90 100644
--- a/frontend-modern/src/components/shared/cards/HardwareCard.tsx
+++ b/frontend-modern/src/components/shared/cards/HardwareCard.tsx
@@ -1,6 +1,6 @@
import { Component } from 'solid-js';
import type { Agent, Node } from '@/types/api';
-import { InfoCardFrame } from '@/components/shared/InfoCardFrame';
+import { InfoCardFrame, InfoCardKeyValueRow } from '@/components/shared/InfoCardFrame';
import { formatBytes } from '@/utils/format';
type HardwareCardProps = { variant: 'node'; node: Node } | { variant: 'agent'; agent: Agent };
@@ -14,25 +14,14 @@ export const HardwareCard: Component<HardwareCardProps> = (props) => {
Hardware
</div>
<div class="space-y-1.5 text-[11px]">
- <div class="flex items-center justify-between">
- <span class="text-muted">CPU Model</span>
- <div
- class="font-medium text-base-content text-right truncate max-w-[150px]"
- title={node.cpuInfo?.model || 'Unknown'}
- >
- {node.cpuInfo?.model || 'Unknown'}
- </div>
- </div>
- <div class="flex items-center justify-between">
- <span class="text-muted">Cores</span>
- <span class="font-medium text-base-content">{node.cpuInfo?.cores || 0}</span>
- </div>
- <div class="flex items-center justify-between">
- <span class="text-muted">Memory</span>
- <span class="font-medium text-base-content">
- {formatBytes(node.memory?.total || 0)}
- </span>
- </div>
+ <InfoCardKeyValueRow
+ label="CPU Model"
+ value={node.cpuInfo?.model || 'Unknown'}
+ valueClass="truncate"
+ valueTitle={node.cpuInfo?.model || 'Unknown'}
+ />
+ <InfoCardKeyValueRow label="Cores" value={node.cpuInfo?.cores || 0} />
+ <InfoCardKeyValueRow label="Memory" value={formatBytes(node.memory?.total || 0)} />
</div>
</InfoCardFrame>
);
@@ -45,20 +34,9 @@ export const HardwareCard: Component<HardwareCardProps> = (props) => {
Hardware
</div>
<div class="space-y-1.5 text-[11px]">
- <div class="flex items-center justify-between">
- <span class="text-muted">CPU</span>
- <span class="font-medium text-base-content">{agentInfo.cpuCount} Cores</span>
- </div>
- <div class="flex items-center justify-between">
- <span class="text-muted">Memory</span>
- <span class="font-medium text-base-content">
- {formatBytes(agentInfo.memory?.total || 0)}
- </span>
- </div>
- <div class="flex items-center justify-between">
- <span class="text-muted">Agent</span>
- <span class="font-medium text-base-content">{agentInfo.agentVersion}</span>
- </div>
+ <InfoCardKeyValueRow label="CPU" value={`${agentInfo.cpuCount} Cores`} />
+ <InfoCardKeyValueRow label="Memory" value={formatBytes(agentInfo.memory?.total || 0)} />
+ <InfoCardKeyValueRow label="Agent" value={agentInfo.agentVersion} />
</div>
</InfoCardFrame>
);
diff --git a/frontend-modern/src/components/shared/cards/RootDiskCard.tsx b/frontend-modern/src/components/shared/cards/RootDiskCard.tsx
index 4d19024c3c..8c2066317c 100644
--- a/frontend-modern/src/components/shared/cards/RootDiskCard.tsx
+++ b/frontend-modern/src/components/shared/cards/RootDiskCard.tsx
@@ -1,6 +1,6 @@
import { Component } from 'solid-js';
import { Node } from '@/types/api';
-import { InfoCardFrame } from '@/components/shared/InfoCardFrame';
+import { InfoCardFrame, InfoCardKeyValueRow } from '@/components/shared/InfoCardFrame';
import { formatBytes } from '@/utils/format';
import { StackedDiskBar } from '@/components/Workloads/StackedDiskBar';
@@ -26,12 +26,12 @@ export const RootDiskCard: Component<RootDiskCardProps> = (props) => {
Root Disk
</div>
<div class="mb-3">
- <div class="flex justify-between text-[10px] mb-1">
- <span class="text-muted">Usage</span>
- <span class="text-base-content">
- {formatBytes(diskStats().used)} / {formatBytes(diskStats().total)}
- </span>
- </div>
+ <InfoCardKeyValueRow
+ class="mb-1 text-[10px]"
+ label="Usage"
+ value={`${formatBytes(diskStats().used)} / ${formatBytes(diskStats().total)}`}
+ valueClass="font-normal"
+ />
<StackedDiskBar
aggregateDisk={{
total: diskStats().total,
diff --git a/frontend-modern/src/components/shared/cards/SystemInfoCard.tsx b/frontend-modern/src/components/shared/cards/SystemInfoCard.tsx
index a4e34b4408..4d8294358d 100644
--- a/frontend-modern/src/components/shared/cards/SystemInfoCard.tsx
+++ b/frontend-modern/src/components/shared/cards/SystemInfoCard.tsx
@@ -1,6 +1,6 @@
import { Component, Show } from 'solid-js';
import type { Agent, Node } from '@/types/api';
-import { InfoCardFrame } from '@/components/shared/InfoCardFrame';
+import { InfoCardFrame, InfoCardKeyValueRow } from '@/components/shared/InfoCardFrame';
import { formatUptime } from '@/utils/format';
type SystemInfoCardProps = { variant: 'node'; node: Node } | { variant: 'agent'; agent: Agent };
@@ -14,29 +14,26 @@ export const SystemInfoCard: Component<SystemInfoCardProps> = (props) => {
System
</div>
<div class="space-y-1.5 text-[11px]">
- <div class="flex items-center justify-between gap-2 min-w-0">
- <span class="text-muted shrink-0">Node</span>
- <span class="font-medium text-base-content select-all truncate" title={node.name}>
- {node.name}
- </span>
- </div>
- <div class="flex items-center justify-between gap-2 min-w-0">
- <span class="text-muted shrink-0">Version</span>
- <span class="font-medium text-base-content truncate" title={node.pveVersion}>
- {node.pveVersion}
- </span>
- </div>
- <div class="flex items-center justify-between gap-2 min-w-0">
- <span class="text-muted shrink-0">Kernel</span>
- <span class="font-medium text-base-content truncate" title={node.kernelVersion}>
- {node.kernelVersion}
- </span>
- </div>
+ <InfoCardKeyValueRow
+ label="Node"
+ value={node.name}
+ valueClass="select-all truncate"
+ valueTitle={node.name}
+ />
+ <InfoCardKeyValueRow
+ label="Version"
+ value={node.pveVersion}
+ valueClass="truncate"
+ valueTitle={node.pveVersion}
+ />
+ <InfoCardKeyValueRow
+ label="Kernel"
+ value={node.kernelVersion}
+ valueClass="truncate"
+ valueTitle={node.kernelVersion}
+ />
<Show when={node.uptime}>
- <div class="flex items-center justify-between">
- <span class="text-muted">Uptime</span>
- <span class="font-medium text-base-content">{formatUptime(node.uptime!)}</span>
- </div>
+ <InfoCardKeyValueRow label="Uptime" value={formatUptime(node.uptime!)} />
</Show>
</div>
</InfoCardFrame>
@@ -50,47 +47,35 @@ export const SystemInfoCard: Component<SystemInfoCardProps> = (props) => {
System
</div>
<div class="space-y-1.5 text-[11px]">
- <div class="flex items-center justify-between gap-2 min-w-0">
- <span class="text-muted shrink-0">Hostname</span>
- <span
- class="font-medium text-base-content select-all truncate"
- title={agentInfo.hostname}
- >
- {agentInfo.hostname}
- </span>
- </div>
- <div class="flex items-center justify-between gap-2 min-w-0">
- <span class="text-muted shrink-0">OS</span>
- <span
- class="font-medium text-base-content truncate"
- title={
- agentInfo.osName
- ? `${agentInfo.osName}${agentInfo.osVersion ? ` ${agentInfo.osVersion}` : ''}`
- : agentInfo.platform || 'Unknown'
- }
- >
- {agentInfo.osName
+ <InfoCardKeyValueRow
+ label="Hostname"
+ value={agentInfo.hostname}
+ valueClass="select-all truncate"
+ valueTitle={agentInfo.hostname}
+ />
+ <InfoCardKeyValueRow
+ label="OS"
+ value={
+ agentInfo.osName
? `${agentInfo.osName}${agentInfo.osVersion ? ` ${agentInfo.osVersion}` : ''}`
- : agentInfo.platform || 'Unknown'}
- </span>
- </div>
- <div class="flex items-center justify-between gap-2 min-w-0">
- <span class="text-muted shrink-0">Kernel</span>
- <span class="font-medium text-base-content truncate" title={agentInfo.kernelVersion}>
- {agentInfo.kernelVersion}
- </span>
- </div>
- <div class="flex items-center justify-between">
- <span class="text-muted">Architecture</span>
- <span class="font-medium text-base-content">{agentInfo.architecture}</span>
- </div>
+ : agentInfo.platform || 'Unknown'
+ }
+ valueClass="truncate"
+ valueTitle={
+ agentInfo.osName
+ ? `${agentInfo.osName}${agentInfo.osVersion ? ` ${agentInfo.osVersion}` : ''}`
+ : agentInfo.platform || 'Unknown'
+ }
+ />
+ <InfoCardKeyValueRow
+ label="Kernel"
+ value={agentInfo.kernelVersion}
+ valueClass="truncate"
+ valueTitle={agentInfo.kernelVersion}
+ />
+ <InfoCardKeyValueRow label="Architecture" value={agentInfo.architecture} />
<Show when={agentInfo.uptimeSeconds}>
- <div class="flex items-center justify-between">
- <span class="text-muted">Uptime</span>
- <span class="font-medium text-base-content">
- {formatUptime(agentInfo.uptimeSeconds!)}
- </span>
- </div>
+ <InfoCardKeyValueRow label="Uptime" value={formatUptime(agentInfo.uptimeSeconds!)} />
</Show>
</div>
</InfoCardFrame>
diff --git a/frontend-modern/src/components/shared/cards/TemperaturesCard.tsx b/frontend-modern/src/components/shared/cards/TemperaturesCard.tsx
index a5f3201e97..cadeadbfa9 100644
--- a/frontend-modern/src/components/shared/cards/TemperaturesCard.tsx
+++ b/frontend-modern/src/components/shared/cards/TemperaturesCard.tsx
@@ -1,5 +1,5 @@
import { Component, For } from 'solid-js';
-import { InfoCardFrame } from '@/components/shared/InfoCardFrame';
+import { InfoCardFrame, InfoCardKeyValueRow } from '@/components/shared/InfoCardFrame';
interface TemperatureRow {
label: string;
@@ -23,15 +23,12 @@ export const TemperaturesCard: Component<TemperaturesCardProps> = (props) => {
<div class="space-y-1.5 text-[11px]">
<For each={props.rows}>
{(row) => (
- <div class="flex items-center justify-between gap-2 min-w-0">
- <span class="text-muted shrink-0">{row.label}</span>
- <span
- class="font-medium text-base-content truncate"
- title={row.valueTitle || row.value}
- >
- {row.value}
- </span>
- </div>
+ <InfoCardKeyValueRow
+ label={row.label}
+ value={row.value}
+ valueClass="truncate"
+ valueTitle={row.valueTitle || row.value}
+ />
)}
</For>
</div>
diff --git a/frontend-modern/src/features/storageBackups/detailPresentation.ts b/frontend-modern/src/features/storageBackups/detailPresentation.ts
index ccf113a7c9..2aa6c2d141 100644
--- a/frontend-modern/src/features/storageBackups/detailPresentation.ts
+++ b/frontend-modern/src/features/storageBackups/detailPresentation.ts
@@ -26,7 +26,6 @@ export const STORAGE_DETAIL_ROOT_GRID_CLASS = 'grid gap-4 md:grid-cols-2';
export const STORAGE_DETAIL_HEADER_ROW_CLASS = 'flex items-center justify-between mb-2';
export const STORAGE_DETAIL_LINKED_DISKS_LIST_CLASS = 'space-y-1';
-export const STORAGE_DETAIL_KEY_VALUE_ROW_CLASS = 'flex justify-between';
export const STORAGE_DETAIL_KEY_CLASS = 'text-muted';
export const STORAGE_DETAIL_VALUE_CLASS = 'text-base-content font-medium';
diff --git a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
index 8ac667492d..7df9ac6186 100644
--- a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
+++ b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
@@ -1620,7 +1620,8 @@ describe('frontend resource type boundaries', () => {
expect(storageDetailPresentationSource).toContain(
'export const STORAGE_DETAIL_FULL_WIDTH_ROW_CLASS',
);
- expect(storageDetailKeyValueRowSource).toContain('STORAGE_DETAIL_KEY_VALUE_ROW_CLASS');
+ expect(storageDetailKeyValueRowSource).toContain('InfoCardKeyValueRow');
+ expect(storageDetailKeyValueRowSource).toContain('desktopAt="sm"');
expect(storageDetailMetricCardSource).toContain('STORAGE_DETAIL_CARD_CLASS');
expect(storagePoolDetailSource).toContain('<tr class={STORAGE_DETAIL_ROW_CLASS}>');
expect(storagePoolDetailSource).not.toContain('border-t border-border');