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.

Canonicalize section-framed product tables

rcourtmanddbadbf01a0a
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
index d222543716..55de73feef 100644
--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
@@ -143,7 +143,11 @@ The lifecycle-owned infrastructure source manager also owns platform/system
grouping as source-management content, but not its table band presentation:
`frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx` must
route table-level product/system group rows through the shared grouped table row
-helper instead of carrying lifecycle-local background or hover classes.
+helper instead of carrying lifecycle-local background or hover classes. Its
+desktop source-management table also inherits the surrounding settings panel
+frame and the shared `Table` shell from `frontend-primitives`; lifecycle work
+must not restore a local `overflow-x-auto` wrapper or a page-local table card
+around that table.
## Extension Points
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 71acaf2d49..4bb0f1e892 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -182,7 +182,10 @@ work extends shared components instead of creating new local variants.
tables must not wrap it in page-local scroll containers just to restore
table sides or mobile overflow. Headerless product tables, including alert
history, still use `TableCard` for the outer frame instead of hand-coded
- rounded/bordered wrappers.
+ rounded/bordered wrappers. Product tables already inside a canonical
+ section frame, including storage pools, physical disks, and infrastructure
+ settings source tables, must use `Table` directly rather than nesting
+ another card or scroll wrapper.
Product-table subgroup/header rows must likewise consume the shared
`frontend-modern/src/components/shared/groupedTableRowPresentation.ts`
helper and `.grouped-table-row` CSS token contract instead of local
diff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.md
index c8df53cf14..374f2d2b7c 100644
--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md
+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md
@@ -73,7 +73,9 @@ querying, and the operator-facing storage health presentation layer.
lighter open-sided Recovery table frames. Recovery and storage tables must
use the shared `Table` scroll shell directly; if a table needs the card body
surface fill it may pass `wrapperClass`, but it must not nest a local
- `overflow-x-auto` div around the shared table.
+ `overflow-x-auto` div around the shared table. Storage pools and physical
+ disks inherit the surrounding `StorageContentCard` frame and must not add
+ a nested `Card` or second scroll wrapper.
Recovery inventory protection posture and recovery-event outcome filtering
must stay separate in that owner: protected inventory uses the route-backed
`state` query for health, stale, failed, warning, running, unknown, and
diff --git a/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx b/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx
index 612eb42c2c..8f0dd3630b 100644
--- a/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx
+++ b/frontend-modern/src/components/Settings/InfrastructureSourceManager.tsx
@@ -588,422 +588,417 @@ export const InfrastructureSourceManager: Component<InfrastructureSourceManagerP
{setupConfidenceBand()}
<Show when={!useCardLayout()}>
- <div class="overflow-x-auto">
- <Table class="w-full min-w-[820px] table-fixed text-sm">
- <TableHeader class="bg-surface-alt/60">
- <TableRow>
- <TableHead class="w-[22%] py-1.5 pl-3 pr-3 text-left text-[11px] font-medium text-muted whitespace-nowrap xl:w-[20%]">
- System
- </TableHead>
- <TableHead class="w-[7.5rem] px-3 py-1.5 text-left text-[11px] font-medium text-muted whitespace-nowrap">
- Source
- </TableHead>
- <TableHead class="w-[21%] px-3 py-1.5 text-left text-[11px] font-medium text-muted whitespace-nowrap xl:w-[20%]">
- Endpoint
- </TableHead>
- <TableHead class="w-[18%] px-3 py-1.5 text-left text-[11px] font-medium text-muted whitespace-nowrap xl:w-[22%]">
- Coverage
+ <Table class="w-full min-w-[820px] table-fixed text-sm">
+ <TableHeader class="bg-surface-alt/60">
+ <TableRow>
+ <TableHead class="w-[22%] py-1.5 pl-3 pr-3 text-left text-[11px] font-medium text-muted whitespace-nowrap xl:w-[20%]">
+ System
+ </TableHead>
+ <TableHead class="w-[7.5rem] px-3 py-1.5 text-left text-[11px] font-medium text-muted whitespace-nowrap">
+ Source
+ </TableHead>
+ <TableHead class="w-[21%] px-3 py-1.5 text-left text-[11px] font-medium text-muted whitespace-nowrap xl:w-[20%]">
+ Endpoint
+ </TableHead>
+ <TableHead class="w-[18%] px-3 py-1.5 text-left text-[11px] font-medium text-muted whitespace-nowrap xl:w-[22%]">
+ Coverage
+ </TableHead>
+ <TableHead class="w-[16%] px-3 py-1.5 text-left text-[11px] font-medium text-muted whitespace-nowrap xl:w-[15%]">
+ Status
+ </TableHead>
+ <Show when={actionColumnVisible()}>
+ <TableHead class="w-[7rem] px-3 py-1.5 text-right text-[11px] font-medium text-muted whitespace-nowrap">
+ Actions
</TableHead>
- <TableHead class="w-[16%] px-3 py-1.5 text-left text-[11px] font-medium text-muted whitespace-nowrap xl:w-[15%]">
- Status
- </TableHead>
- <Show when={actionColumnVisible()}>
- <TableHead class="w-[7rem] px-3 py-1.5 text-right text-[11px] font-medium text-muted whitespace-nowrap">
- Actions
- </TableHead>
- </Show>
- </TableRow>
- </TableHeader>
-
- <TableBody class="bg-surface">
- <For each={sortedProducts()}>
- {(product) => {
- const configuredRows = () => groupedConfiguredRows().get(product.type) ?? [];
- const discoveredRows = () => groupedDiscoveredRows().get(product.type) ?? [];
- const groupRowClass = () =>
- getGroupedTableRowClass('border-b border-border-subtle');
-
- return (
- <>
- <Show
- when={actionColumnVisible()}
- fallback={
- <TableRow class={groupRowClass()}>
- <TableCell colspan={5} class={getGroupedTableRowCellClass()}>
- <div class="flex min-w-0 items-center gap-2">
- <span>{product.label}</span>
- </div>
- </TableCell>
- </TableRow>
- }
- >
+ </Show>
+ </TableRow>
+ </TableHeader>
+
+ <TableBody class="bg-surface">
+ <For each={sortedProducts()}>
+ {(product) => {
+ const configuredRows = () => groupedConfiguredRows().get(product.type) ?? [];
+ const discoveredRows = () => groupedDiscoveredRows().get(product.type) ?? [];
+ const groupRowClass = () =>
+ getGroupedTableRowClass('border-b border-border-subtle');
+
+ return (
+ <>
+ <Show
+ when={actionColumnVisible()}
+ fallback={
<TableRow class={groupRowClass()}>
- <TableCell colspan={6} class={getGroupedTableRowCellClass()}>
- <div class="flex items-center justify-between gap-2 whitespace-nowrap">
+ <TableCell colspan={5} class={getGroupedTableRowCellClass()}>
+ <div class="flex min-w-0 items-center gap-2">
<span>{product.label}</span>
- <Show when={!props.readOnly && props.onAddSource}>
- <button
- type="button"
- onClick={() => props.onAddSource?.(product.type)}
- class={`${addSectionButtonClass} whitespace-nowrap`}
- aria-label={product.actionLabel}
- title={product.actionLabel}
- >
- <Plus class="h-3.5 w-3.5" />
- {product.actionLabel}
- </button>
- </Show>
</div>
</TableCell>
</TableRow>
- </Show>
-
- <Show when={configuredRows().length > 0}>
- <For each={configuredRows()}>
- {(row) => {
- return (
- <>
- <TableRow
- class={`border-b border-border-subtle ${
- row.isCluster ? 'bg-surface-alt/40' : ''
- }`}
- >
- <TableCell class="py-1 pl-3 pr-3 align-top">
- <div
- class={`text-[13px] ${
- row.isCluster
- ? 'font-medium text-base-content'
- : 'text-base-content/80'
- } ${wrappedFieldClass}`}
- title={row.name}
- >
- {row.name}
- </div>
- <Show when={row.isCluster && row.subtitle}>
- <div class="mt-0.5 text-[11px] text-muted">
- {row.subtitle}
- </div>
- </Show>
- <Show when={!row.isCluster && row.identitySubtitle}>
- <div class="mt-0.5 text-[11px] text-muted">
- {row.identitySubtitle}
- </div>
- </Show>
- </TableCell>
-
- <TableCell class="px-3 py-1 align-top">
- {(() => {
- const presentation = infrastructureSourcePresentation(
- row.source,
- );
- const title =
- agentMethodTitleFor(row) ?? presentation.title;
- return (
- <span
- class={`${presentation.badgeClassName} whitespace-nowrap`}
- title={title}
- >
- {presentation.label}
- </span>
- );
- })()}
- </TableCell>
-
- <TableCell class="px-3 py-1 align-top">
- <Show
- when={row.host}
- fallback={<span class="text-xs text-muted">-</span>}
- >
- <div
- class="truncate whitespace-nowrap text-[12px] text-muted"
- title={row.host}
- >
- {row.host}
- </div>
- </Show>
- </TableCell>
-
- <TableCell class="px-3 py-1 align-top">
- <Show
- when={row.coverageLabels.length > 0}
- fallback={<span class="text-xs text-muted">-</span>}
- >
- <div
- class="whitespace-normal break-words text-[12px] leading-4 text-muted"
- title={row.coverageLabels.join(', ')}
- >
- {row.coverageLabels.join(', ')}
- </div>
- </Show>
- </TableCell>
-
- <TableCell class="px-3 py-1 align-top">
- <div class="flex flex-wrap items-center gap-x-1.5 gap-y-1">
- <span
- class={`inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium whitespace-nowrap ${row.statusClassName}`}
- >
- {row.statusLabel}
- </span>
- <Show when={row.agentUpdateCount > 0}>
- <span class="inline-flex items-center rounded-full bg-amber-100 px-2 py-0.5 text-[11px] font-medium whitespace-nowrap text-amber-800 dark:bg-amber-900 dark:text-amber-200">
- {row.agentUpdateCount === 1
- ? 'Agent update'
- : `${row.agentUpdateCount} agent updates`}
- </span>
- </Show>
- <span class="whitespace-nowrap text-[12px] text-muted/90">
- {row.lastActivityText}
- </span>
- </div>
- <div class="mt-1 flex flex-wrap items-center gap-1">
- <For each={row.fleetHighlights}>
- {(signal) => (
- <span
- class={fleetSignalClassName(signal.tone)}
- title={signal.detail}
- >
- {signal.label}
- </span>
- )}
- </For>
- </div>
- </TableCell>
-
- <Show when={actionColumnVisible()}>
- <TableCell class="px-3 py-1 align-top text-right">
- <Show
- when={rowInteractive(row)}
- fallback={
- <span class="text-xs text-muted">Read only</span>
- }
- >
- <button
- type="button"
- onClick={() => props.onOpenConnection?.(row)}
- class={inlineButtonClass}
- >
- Manage
- </button>
- </Show>
- </TableCell>
- </Show>
- </TableRow>
-
- <Show when={row.lastErrorMessage}>
- <TableRow class="border-b border-border-subtle">
- <TableCell
- colspan={actionColumnVisible() ? 6 : 5}
- class="bg-surface px-3 pb-1.5 pt-0"
- >
- <div
- role="alert"
- class="rounded-md border border-rose-300 bg-rose-50 px-3 py-2 text-xs text-rose-800 dark:border-rose-900 dark:bg-rose-950 dark:text-rose-200"
- >
- {row.lastErrorMessage}
- </div>
- </TableCell>
- </TableRow>
- </Show>
-
- <Show when={row.members.length > 0}>
- <For each={row.members}>
- {(member, memberIndex) => {
- const memberPresentation = infrastructureSourcePresentation(
- member.source,
- );
- const memberSourceTitle =
- memberMethodTitleFor(row, memberIndex()) ??
- memberPresentation.title;
- return (
- <TableRow class="border-b border-border-subtle bg-surface-alt/30">
- <TableCell class="py-1 pl-3 pr-3 align-top">
- <div class="flex min-w-0 items-start gap-2 pl-4">
- <span class="mt-1.5 h-1.5 w-1.5 flex-shrink-0 rounded-full bg-border" />
- <div class="min-w-0">
- <div
- class={`text-[13px] text-base-content/85 ${wrappedFieldClass}`}
- title={member.name}
- >
- {member.name}
- </div>
- <div class="mt-0.5 text-[11px] text-muted">
- {member.subtitle}
- </div>
- </div>
- </div>
- </TableCell>
-
- <TableCell class="px-3 py-1 align-top">
- <span
- class={`${memberPresentation.badgeClassName} whitespace-nowrap`}
- title={memberSourceTitle}
- >
- {memberPresentation.label}
- </span>
- </TableCell>
-
- <TableCell class="px-3 py-1 align-top">
- <Show
- when={member.host}
- fallback={<span class="text-xs text-muted">-</span>}
- >
- <div
- class="truncate whitespace-nowrap text-[12px] text-muted"
- title={member.host}
- >
- {member.host}
- </div>
- </Show>
- </TableCell>
-
- <TableCell class="px-3 py-1 align-top">
- <Show
- when={member.coverageLabels.length > 0}
- fallback={<span class="text-xs text-muted">-</span>}
- >
- <div
- class="whitespace-normal break-words text-[12px] leading-4 text-muted"
- title={member.coverageLabels.join(', ')}
- >
- {member.coverageLabels.join(', ')}
- </div>
- </Show>
- </TableCell>
-
- <TableCell class="px-3 py-1 align-top">
- <div class="flex flex-wrap items-center gap-x-1.5 gap-y-1">
- <span
- class={`inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium whitespace-nowrap ${member.statusClassName}`}
- >
- {member.statusLabel}
- </span>
- <span class="whitespace-nowrap text-[12px] text-muted/90">
- {member.lastActivityText}
- </span>
- </div>
- <div class="mt-1 flex flex-wrap items-center gap-1">
- <For each={member.fleetHighlights}>
- {(signal) => (
- <span
- class={fleetSignalClassName(signal.tone)}
- title={signal.detail}
- >
- {signal.label}
- </span>
- )}
- </For>
- </div>
- </TableCell>
+ }
+ >
+ <TableRow class={groupRowClass()}>
+ <TableCell colspan={6} class={getGroupedTableRowCellClass()}>
+ <div class="flex items-center justify-between gap-2 whitespace-nowrap">
+ <span>{product.label}</span>
+ <Show when={!props.readOnly && props.onAddSource}>
+ <button
+ type="button"
+ onClick={() => props.onAddSource?.(product.type)}
+ class={`${addSectionButtonClass} whitespace-nowrap`}
+ aria-label={product.actionLabel}
+ title={product.actionLabel}
+ >
+ <Plus class="h-3.5 w-3.5" />
+ {product.actionLabel}
+ </button>
+ </Show>
+ </div>
+ </TableCell>
+ </TableRow>
+ </Show>
- <Show when={actionColumnVisible()}>
- <TableCell class="px-3 py-1 align-top text-right">
- <span class="text-xs text-muted" aria-hidden="true">
- —
- </span>
- </TableCell>
- </Show>
- </TableRow>
- );
- }}
- </For>
- </Show>
- </>
- );
- }}
- </For>
- </Show>
-
- <Show when={discoveredRows().length > 0}>
- <For each={discoveredRows()}>
- {(server) => {
- return (
- <TableRow class={discoveryRowClass}>
+ <Show when={configuredRows().length > 0}>
+ <For each={configuredRows()}>
+ {(row) => {
+ return (
+ <>
+ <TableRow
+ class={`border-b border-border-subtle ${
+ row.isCluster ? 'bg-surface-alt/40' : ''
+ }`}
+ >
<TableCell class="py-1 pl-3 pr-3 align-top">
<div
- class={`text-[13px] text-base-content/85 ${wrappedFieldClass}`}
- title={`${discoveredServerName(server)}${server.version ? ` · ${server.version}` : ''}`}
+ class={`text-[13px] ${
+ row.isCluster
+ ? 'font-medium text-base-content'
+ : 'text-base-content/80'
+ } ${wrappedFieldClass}`}
+ title={row.name}
>
- {discoveredServerName(server)}
+ {row.name}
</div>
+ <Show when={row.isCluster && row.subtitle}>
+ <div class="mt-0.5 text-[11px] text-muted">
+ {row.subtitle}
+ </div>
+ </Show>
+ <Show when={!row.isCluster && row.identitySubtitle}>
+ <div class="mt-0.5 text-[11px] text-muted">
+ {row.identitySubtitle}
+ </div>
+ </Show>
</TableCell>
<TableCell class="px-3 py-1 align-top">
- <span
- class="inline-flex items-center rounded-full border border-dashed border-border bg-surface-alt px-2 py-0.5 text-[11px] font-medium text-muted whitespace-nowrap"
- title="Discovery candidate — review to attach a source"
- >
- Candidate
- </span>
+ {(() => {
+ const presentation = infrastructureSourcePresentation(
+ row.source,
+ );
+ const title = agentMethodTitleFor(row) ?? presentation.title;
+ return (
+ <span
+ class={`${presentation.badgeClassName} whitespace-nowrap`}
+ title={title}
+ >
+ {presentation.label}
+ </span>
+ );
+ })()}
</TableCell>
<TableCell class="px-3 py-1 align-top">
- <div
- class="truncate whitespace-nowrap text-[12px] text-muted"
- title={discoveredServerEndpoint(server)}
+ <Show
+ when={row.host}
+ fallback={<span class="text-xs text-muted">-</span>}
>
- {discoveredServerEndpoint(server)}
- </div>
+ <div
+ class="truncate whitespace-nowrap text-[12px] text-muted"
+ title={row.host}
+ >
+ {row.host}
+ </div>
+ </Show>
</TableCell>
<TableCell class="px-3 py-1 align-top">
- <div
- class="whitespace-normal break-words text-[12px] leading-4 text-muted"
- title={discoveredCoverageText(server)}
+ <Show
+ when={row.coverageLabels.length > 0}
+ fallback={<span class="text-xs text-muted">-</span>}
>
- {discoveredCoverageText(server)}
- </div>
+ <div
+ class="whitespace-normal break-words text-[12px] leading-4 text-muted"
+ title={row.coverageLabels.join(', ')}
+ >
+ {row.coverageLabels.join(', ')}
+ </div>
+ </Show>
</TableCell>
<TableCell class="px-3 py-1 align-top">
<div class="flex flex-wrap items-center gap-x-1.5 gap-y-1">
- <span class="inline-flex items-center rounded-full bg-blue-100 px-2 py-0.5 text-[11px] font-medium whitespace-nowrap text-blue-800 dark:bg-blue-950/40 dark:text-blue-200">
- Discovered
+ <span
+ class={`inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium whitespace-nowrap ${row.statusClassName}`}
+ >
+ {row.statusLabel}
</span>
+ <Show when={row.agentUpdateCount > 0}>
+ <span class="inline-flex items-center rounded-full bg-amber-100 px-2 py-0.5 text-[11px] font-medium whitespace-nowrap text-amber-800 dark:bg-amber-900 dark:text-amber-200">
+ {row.agentUpdateCount === 1
+ ? 'Agent update'
+ : `${row.agentUpdateCount} agent updates`}
+ </span>
+ </Show>
<span class="whitespace-nowrap text-[12px] text-muted/90">
- {lastDiscoveryResultText() ?? 'Waiting for scan'}
+ {row.lastActivityText}
</span>
</div>
+ <div class="mt-1 flex flex-wrap items-center gap-1">
+ <For each={row.fleetHighlights}>
+ {(signal) => (
+ <span
+ class={fleetSignalClassName(signal.tone)}
+ title={signal.detail}
+ >
+ {signal.label}
+ </span>
+ )}
+ </For>
+ </div>
</TableCell>
<Show when={actionColumnVisible()}>
<TableCell class="px-3 py-1 align-top text-right">
<Show
- when={props.onReviewDiscoveredSource}
+ when={rowInteractive(row)}
fallback={<span class="text-xs text-muted">Read only</span>}
>
<button
type="button"
- onClick={() => props.onReviewDiscoveredSource?.(server)}
+ onClick={() => props.onOpenConnection?.(row)}
class={inlineButtonClass}
>
- Review
+ Manage
</button>
</Show>
</TableCell>
</Show>
</TableRow>
- );
- }}
- </For>
- </Show>
- </>
- );
- }}
- </For>
-
- <Show when={!hasAnyConfigured() && !hasAnyDiscovered()}>
- <TableRow>
- <TableCell
- colspan={actionColumnVisible() ? 6 : 5}
- class="px-4 py-8 text-center text-sm text-muted"
- >
- {emptyStateContent()}
- </TableCell>
- </TableRow>
- </Show>
- </TableBody>
- </Table>
- </div>
+
+ <Show when={row.lastErrorMessage}>
+ <TableRow class="border-b border-border-subtle">
+ <TableCell
+ colspan={actionColumnVisible() ? 6 : 5}
+ class="bg-surface px-3 pb-1.5 pt-0"
+ >
+ <div
+ role="alert"
+ class="rounded-md border border-rose-300 bg-rose-50 px-3 py-2 text-xs text-rose-800 dark:border-rose-900 dark:bg-rose-950 dark:text-rose-200"
+ >
+ {row.lastErrorMessage}
+ </div>
+ </TableCell>
+ </TableRow>
+ </Show>
+
+ <Show when={row.members.length > 0}>
+ <For each={row.members}>
+ {(member, memberIndex) => {
+ const memberPresentation = infrastructureSourcePresentation(
+ member.source,
+ );
+ const memberSourceTitle =
+ memberMethodTitleFor(row, memberIndex()) ??
+ memberPresentation.title;
+ return (
+ <TableRow class="border-b border-border-subtle bg-surface-alt/30">
+ <TableCell class="py-1 pl-3 pr-3 align-top">
+ <div class="flex min-w-0 items-start gap-2 pl-4">
+ <span class="mt-1.5 h-1.5 w-1.5 flex-shrink-0 rounded-full bg-border" />
+ <div class="min-w-0">
+ <div
+ class={`text-[13px] text-base-content/85 ${wrappedFieldClass}`}
+ title={member.name}
+ >
+ {member.name}
+ </div>
+ <div class="mt-0.5 text-[11px] text-muted">
+ {member.subtitle}
+ </div>
+ </div>
+ </div>
+ </TableCell>
+
+ <TableCell class="px-3 py-1 align-top">
+ <span
+ class={`${memberPresentation.badgeClassName} whitespace-nowrap`}
+ title={memberSourceTitle}
+ >
+ {memberPresentation.label}
+ </span>
+ </TableCell>
+
+ <TableCell class="px-3 py-1 align-top">
+ <Show
+ when={member.host}
+ fallback={<span class="text-xs text-muted">-</span>}
+ >
+ <div
+ class="truncate whitespace-nowrap text-[12px] text-muted"
+ title={member.host}
+ >
+ {member.host}
+ </div>
+ </Show>
+ </TableCell>
+
+ <TableCell class="px-3 py-1 align-top">
+ <Show
+ when={member.coverageLabels.length > 0}
+ fallback={<span class="text-xs text-muted">-</span>}
+ >
+ <div
+ class="whitespace-normal break-words text-[12px] leading-4 text-muted"
+ title={member.coverageLabels.join(', ')}
+ >
+ {member.coverageLabels.join(', ')}
+ </div>
+ </Show>
+ </TableCell>
+
+ <TableCell class="px-3 py-1 align-top">
+ <div class="flex flex-wrap items-center gap-x-1.5 gap-y-1">
+ <span
+ class={`inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium whitespace-nowrap ${member.statusClassName}`}
+ >
+ {member.statusLabel}
+ </span>
+ <span class="whitespace-nowrap text-[12px] text-muted/90">
+ {member.lastActivityText}
+ </span>
+ </div>
+ <div class="mt-1 flex flex-wrap items-center gap-1">
+ <For each={member.fleetHighlights}>
+ {(signal) => (
+ <span
+ class={fleetSignalClassName(signal.tone)}
+ title={signal.detail}
+ >
+ {signal.label}
+ </span>
+ )}
+ </For>
+ </div>
+ </TableCell>
+
+ <Show when={actionColumnVisible()}>
+ <TableCell class="px-3 py-1 align-top text-right">
+ <span class="text-xs text-muted" aria-hidden="true">
+ —
+ </span>
+ </TableCell>
+ </Show>
+ </TableRow>
+ );
+ }}
+ </For>
+ </Show>
+ </>
+ );
+ }}
+ </For>
+ </Show>
+
+ <Show when={discoveredRows().length > 0}>
+ <For each={discoveredRows()}>
+ {(server) => {
+ return (
+ <TableRow class={discoveryRowClass}>
+ <TableCell class="py-1 pl-3 pr-3 align-top">
+ <div
+ class={`text-[13px] text-base-content/85 ${wrappedFieldClass}`}
+ title={`${discoveredServerName(server)}${server.version ? ` · ${server.version}` : ''}`}
+ >
+ {discoveredServerName(server)}
+ </div>
+ </TableCell>
+
+ <TableCell class="px-3 py-1 align-top">
+ <span
+ class="inline-flex items-center rounded-full border border-dashed border-border bg-surface-alt px-2 py-0.5 text-[11px] font-medium text-muted whitespace-nowrap"
+ title="Discovery candidate — review to attach a source"
+ >
+ Candidate
+ </span>
+ </TableCell>
+
+ <TableCell class="px-3 py-1 align-top">
+ <div
+ class="truncate whitespace-nowrap text-[12px] text-muted"
+ title={discoveredServerEndpoint(server)}
+ >
+ {discoveredServerEndpoint(server)}
+ </div>
+ </TableCell>
+
+ <TableCell class="px-3 py-1 align-top">
+ <div
+ class="whitespace-normal break-words text-[12px] leading-4 text-muted"
+ title={discoveredCoverageText(server)}
+ >
+ {discoveredCoverageText(server)}
+ </div>
+ </TableCell>
+
+ <TableCell class="px-3 py-1 align-top">
+ <div class="flex flex-wrap items-center gap-x-1.5 gap-y-1">
+ <span class="inline-flex items-center rounded-full bg-blue-100 px-2 py-0.5 text-[11px] font-medium whitespace-nowrap text-blue-800 dark:bg-blue-950/40 dark:text-blue-200">
+ Discovered
+ </span>
+ <span class="whitespace-nowrap text-[12px] text-muted/90">
+ {lastDiscoveryResultText() ?? 'Waiting for scan'}
+ </span>
+ </div>
+ </TableCell>
+
+ <Show when={actionColumnVisible()}>
+ <TableCell class="px-3 py-1 align-top text-right">
+ <Show
+ when={props.onReviewDiscoveredSource}
+ fallback={<span class="text-xs text-muted">Read only</span>}
+ >
+ <button
+ type="button"
+ onClick={() => props.onReviewDiscoveredSource?.(server)}
+ class={inlineButtonClass}
+ >
+ Review
+ </button>
+ </Show>
+ </TableCell>
+ </Show>
+ </TableRow>
+ );
+ }}
+ </For>
+ </Show>
+ </>
+ );
+ }}
+ </For>
+
+ <Show when={!hasAnyConfigured() && !hasAnyDiscovered()}>
+ <TableRow>
+ <TableCell
+ colspan={actionColumnVisible() ? 6 : 5}
+ class="px-4 py-8 text-center text-sm text-muted"
+ >
+ {emptyStateContent()}
+ </TableCell>
+ </TableRow>
+ </Show>
+ </TableBody>
+ </Table>
</Show>
<Show when={useCardLayout()}>
diff --git a/frontend-modern/src/components/Storage/DiskList.tsx b/frontend-modern/src/components/Storage/DiskList.tsx
index 2309f46d29..97fb6a50a2 100644
--- a/frontend-modern/src/components/Storage/DiskList.tsx
+++ b/frontend-modern/src/components/Storage/DiskList.tsx
@@ -1,5 +1,4 @@
import { Component, For, Show } from 'solid-js';
-import { Card } from '@/components/shared/Card';
import {
buildSummaryDisclosureControlsId,
createSummaryInteractiveRowPreviewHandlers,
@@ -67,7 +66,6 @@ import {
PHYSICAL_DISK_TABLE_ROW_HOVER_CLASS,
PHYSICAL_DISK_TABLE_ROW_SELECTED_CLASS,
PHYSICAL_DISK_TABLE_ROW_STYLE,
- PHYSICAL_DISK_TABLE_SCROLL_CLASS,
getPhysicalDiskEmptyStatePresentation,
getPhysicalDiskHealthStatus,
getPhysicalDiskHealthSummary,
@@ -136,7 +134,7 @@ export const DiskList: Component<DiskListProps> = (props) => {
return (
<div>
<Show when={model.filteredDisks().length === 0}>
- <Card padding="lg" class={PHYSICAL_DISK_EMPTY_CARD_CLASS}>
+ <div class={`p-4 sm:p-6 ${PHYSICAL_DISK_EMPTY_CARD_CLASS}`}>
<div class="">
<p class={PHYSICAL_DISK_EMPTY_TITLE_CLASS}>{emptyState().title}</p>
<Show when={emptyState().nodeMessage}>
@@ -173,219 +171,203 @@ export const DiskList: Component<DiskListProps> = (props) => {
</div>
</Show>
</Show>
- </Card>
+ </div>
</Show>
<Show when={model.filteredDisks().length > 0}>
- <Card padding="none" tone="card" class="overflow-hidden">
- <div
- class={PHYSICAL_DISK_TABLE_SCROLL_CLASS}
- style={{ '-webkit-overflow-scrolling': 'touch' }}
- >
- <Table class={PHYSICAL_DISK_TABLE_CLASS}>
- <colgroup>
- <col class={PHYSICAL_DISK_COL_DISK_CLASS} />
- <col class={PHYSICAL_DISK_COL_SOURCE_CLASS} />
- <col class={PHYSICAL_DISK_COL_HOST_CLASS} />
- <col class={PHYSICAL_DISK_COL_ROLE_CLASS} />
- <col class={PHYSICAL_DISK_COL_PARENT_CLASS} />
- <col class={PHYSICAL_DISK_COL_HEALTH_CLASS} />
- <col class={PHYSICAL_DISK_COL_TEMP_CLASS} />
- <col class={PHYSICAL_DISK_COL_SIZE_CLASS} />
- </colgroup>
- <TableHeader>
- <TableRow class={PHYSICAL_DISK_TABLE_HEADER_ROW_CLASS}>
- <TableHead class={PHYSICAL_DISK_HEADER_DISK_CLASS}>Disk</TableHead>
- <TableHead
- class={PHYSICAL_DISK_HEADER_SOURCE_CLASS}
- aria-label="Source"
- title="Source"
- >
- <span aria-hidden="true" class="hidden sm:inline">
- Source
- </span>
- <span aria-hidden="true" class="sm:hidden">
- Src
- </span>
- </TableHead>
- <TableHead class={PHYSICAL_DISK_HEADER_HOST_CLASS}>Host</TableHead>
- <TableHead class={PHYSICAL_DISK_HEADER_ROLE_CLASS}>Role</TableHead>
- <TableHead
- class={PHYSICAL_DISK_HEADER_PARENT_CLASS}
- aria-label="Belongs To"
- title="Belongs To"
- >
- Belongs
- </TableHead>
- <TableHead class={PHYSICAL_DISK_HEADER_HEALTH_CLASS}>Health</TableHead>
- <TableHead class={PHYSICAL_DISK_HEADER_TEMP_CLASS}>Temp</TableHead>
- <TableHead class={PHYSICAL_DISK_HEADER_SIZE_CLASS}>Size</TableHead>
- </TableRow>
- </TableHeader>
- <TableBody class={PHYSICAL_DISK_TABLE_BODY_CLASS}>
- <For each={model.filteredDisks()}>
- {(disk) => {
- const data = model.getDiskData(disk);
- const status = getPhysicalDiskHealthStatus(data);
- const hostLabel = getPhysicalDiskHostLabel(data, disk);
- const healthSummary = getPhysicalDiskHealthSummary(status);
- const sourceBadge = getPhysicalDiskSourceBadgePresentation(disk);
- const isSelected = () => model.selectedDisk()?.id === disk.id;
- const summarySeriesId = resolvePhysicalDiskMetricResourceId(disk);
- const isSummaryHighlighted = () =>
- props.highlightedSummarySeriesId === summarySeriesId;
- const detailControlsId = buildSummaryDisclosureControlsId(summarySeriesId);
- const interactiveRowHandlers = createSummaryInteractiveRowPreviewHandlers({
- onPreview: () => props.onHoverChange?.(disk.id),
- onPreviewClear: () => props.onHoverChange?.(null),
- });
+ <Table class={PHYSICAL_DISK_TABLE_CLASS}>
+ <colgroup>
+ <col class={PHYSICAL_DISK_COL_DISK_CLASS} />
+ <col class={PHYSICAL_DISK_COL_SOURCE_CLASS} />
+ <col class={PHYSICAL_DISK_COL_HOST_CLASS} />
+ <col class={PHYSICAL_DISK_COL_ROLE_CLASS} />
+ <col class={PHYSICAL_DISK_COL_PARENT_CLASS} />
+ <col class={PHYSICAL_DISK_COL_HEALTH_CLASS} />
+ <col class={PHYSICAL_DISK_COL_TEMP_CLASS} />
+ <col class={PHYSICAL_DISK_COL_SIZE_CLASS} />
+ </colgroup>
+ <TableHeader>
+ <TableRow class={PHYSICAL_DISK_TABLE_HEADER_ROW_CLASS}>
+ <TableHead class={PHYSICAL_DISK_HEADER_DISK_CLASS}>Disk</TableHead>
+ <TableHead
+ class={PHYSICAL_DISK_HEADER_SOURCE_CLASS}
+ aria-label="Source"
+ title="Source"
+ >
+ <span aria-hidden="true" class="hidden sm:inline">
+ Source
+ </span>
+ <span aria-hidden="true" class="sm:hidden">
+ Src
+ </span>
+ </TableHead>
+ <TableHead class={PHYSICAL_DISK_HEADER_HOST_CLASS}>Host</TableHead>
+ <TableHead class={PHYSICAL_DISK_HEADER_ROLE_CLASS}>Role</TableHead>
+ <TableHead
+ class={PHYSICAL_DISK_HEADER_PARENT_CLASS}
+ aria-label="Belongs To"
+ title="Belongs To"
+ >
+ Belongs
+ </TableHead>
+ <TableHead class={PHYSICAL_DISK_HEADER_HEALTH_CLASS}>Health</TableHead>
+ <TableHead class={PHYSICAL_DISK_HEADER_TEMP_CLASS}>Temp</TableHead>
+ <TableHead class={PHYSICAL_DISK_HEADER_SIZE_CLASS}>Size</TableHead>
+ </TableRow>
+ </TableHeader>
+ <TableBody class={PHYSICAL_DISK_TABLE_BODY_CLASS}>
+ <For each={model.filteredDisks()}>
+ {(disk) => {
+ const data = model.getDiskData(disk);
+ const status = getPhysicalDiskHealthStatus(data);
+ const hostLabel = getPhysicalDiskHostLabel(data, disk);
+ const healthSummary = getPhysicalDiskHealthSummary(status);
+ const sourceBadge = getPhysicalDiskSourceBadgePresentation(disk);
+ const isSelected = () => model.selectedDisk()?.id === disk.id;
+ const summarySeriesId = resolvePhysicalDiskMetricResourceId(disk);
+ const isSummaryHighlighted = () =>
+ props.highlightedSummarySeriesId === summarySeriesId;
+ const detailControlsId = buildSummaryDisclosureControlsId(summarySeriesId);
+ const interactiveRowHandlers = createSummaryInteractiveRowPreviewHandlers({
+ onPreview: () => props.onHoverChange?.(disk.id),
+ onPreviewClear: () => props.onHoverChange?.(null),
+ });
- return (
- <>
- <TableRow
- data-row-id={disk.id}
- data-summary-series-id={summarySeriesId}
- data-summary-row-active={
- isSummaryHighlighted() && !isSelected() ? 'true' : 'false'
- }
- class={`${PHYSICAL_DISK_TABLE_ROW_CLASS} ${
- isSelected()
- ? PHYSICAL_DISK_TABLE_ROW_SELECTED_CLASS
- : PHYSICAL_DISK_TABLE_ROW_HOVER_CLASS
- }`.trim()}
- style={PHYSICAL_DISK_TABLE_ROW_STYLE}
- onClick={() => model.toggleSelectedDisk(disk)}
- {...interactiveRowHandlers}
- >
- <TableCell class={PHYSICAL_DISK_CELL_DISK_CLASS}>
- <div class={PHYSICAL_DISK_NAME_WRAP_CLASS}>
- <SummaryRowActionButton
- kind="disclosure"
- subjectLabel={data.model || 'disk'}
- expanded={isSelected()}
- controlsId={detailControlsId}
- onAction={() => model.toggleSelectedDisk(disk)}
- onPreviewClear={() => props.onHoverChange?.(null)}
- />
- <span
- class={PHYSICAL_DISK_NAME_TEXT_CLASS}
- title={data.devPath || data.model || disk.name || 'Unknown Disk'}
- >
- {data.model || 'Unknown Disk'}
- </span>
- </div>
- </TableCell>
+ return (
+ <>
+ <TableRow
+ data-row-id={disk.id}
+ data-summary-series-id={summarySeriesId}
+ data-summary-row-active={
+ isSummaryHighlighted() && !isSelected() ? 'true' : 'false'
+ }
+ class={`${PHYSICAL_DISK_TABLE_ROW_CLASS} ${
+ isSelected()
+ ? PHYSICAL_DISK_TABLE_ROW_SELECTED_CLASS
+ : PHYSICAL_DISK_TABLE_ROW_HOVER_CLASS
+ }`.trim()}
+ style={PHYSICAL_DISK_TABLE_ROW_STYLE}
+ onClick={() => model.toggleSelectedDisk(disk)}
+ {...interactiveRowHandlers}
+ >
+ <TableCell class={PHYSICAL_DISK_CELL_DISK_CLASS}>
+ <div class={PHYSICAL_DISK_NAME_WRAP_CLASS}>
+ <SummaryRowActionButton
+ kind="disclosure"
+ subjectLabel={data.model || 'disk'}
+ expanded={isSelected()}
+ controlsId={detailControlsId}
+ onAction={() => model.toggleSelectedDisk(disk)}
+ onPreviewClear={() => props.onHoverChange?.(null)}
+ />
+ <span
+ class={PHYSICAL_DISK_NAME_TEXT_CLASS}
+ title={data.devPath || data.model || disk.name || 'Unknown Disk'}
+ >
+ {data.model || 'Unknown Disk'}
+ </span>
+ </div>
+ </TableCell>
- <TableCell class={PHYSICAL_DISK_CELL_SOURCE_CLASS}>
- <span class={sourceBadge.className}>{sourceBadge.label}</span>
- </TableCell>
+ <TableCell class={PHYSICAL_DISK_CELL_SOURCE_CLASS}>
+ <span class={sourceBadge.className}>{sourceBadge.label}</span>
+ </TableCell>
- <TableCell class={PHYSICAL_DISK_CELL_HOST_CLASS}>
- <Show
- when={hostLabel}
- fallback={
- <span class={PHYSICAL_DISK_MUTED_PLACEHOLDER_CLASS}>—</span>
- }
- >
- <span class={PHYSICAL_DISK_VALUE_TEXT_CLASS} title={hostLabel}>
- {hostLabel}
- </span>
- </Show>
- </TableCell>
+ <TableCell class={PHYSICAL_DISK_CELL_HOST_CLASS}>
+ <Show
+ when={hostLabel}
+ fallback={<span class={PHYSICAL_DISK_MUTED_PLACEHOLDER_CLASS}>—</span>}
+ >
+ <span class={PHYSICAL_DISK_VALUE_TEXT_CLASS} title={hostLabel}>
+ {hostLabel}
+ </span>
+ </Show>
+ </TableCell>
- <TableCell class={PHYSICAL_DISK_CELL_ROLE_CLASS}>
- <Show
- when={getPhysicalDiskRoleLabel(data)}
- fallback={
- <span class={PHYSICAL_DISK_MUTED_PLACEHOLDER_CLASS}>—</span>
- }
- >
- <span
- class={PHYSICAL_DISK_VALUE_TEXT_CLASS}
- title={getPhysicalDiskRoleLabel(data)}
- >
- {getPhysicalDiskRoleLabel(data)}
- </span>
- </Show>
- </TableCell>
+ <TableCell class={PHYSICAL_DISK_CELL_ROLE_CLASS}>
+ <Show
+ when={getPhysicalDiskRoleLabel(data)}
+ fallback={<span class={PHYSICAL_DISK_MUTED_PLACEHOLDER_CLASS}>—</span>}
+ >
+ <span
+ class={PHYSICAL_DISK_VALUE_TEXT_CLASS}
+ title={getPhysicalDiskRoleLabel(data)}
+ >
+ {getPhysicalDiskRoleLabel(data)}
+ </span>
+ </Show>
+ </TableCell>
- <TableCell class={PHYSICAL_DISK_CELL_PARENT_CLASS}>
- <Show
- when={getPhysicalDiskParentLabel(data)}
- fallback={
- <span class={PHYSICAL_DISK_MUTED_PLACEHOLDER_CLASS}>—</span>
- }
- >
- <span
- class={PHYSICAL_DISK_VALUE_TEXT_CLASS}
- title={getPhysicalDiskParentLabel(data)}
- >
- {getPhysicalDiskParentLabel(data)}
- </span>
- </Show>
- </TableCell>
+ <TableCell class={PHYSICAL_DISK_CELL_PARENT_CLASS}>
+ <Show
+ when={getPhysicalDiskParentLabel(data)}
+ fallback={<span class={PHYSICAL_DISK_MUTED_PLACEHOLDER_CLASS}>—</span>}
+ >
+ <span
+ class={PHYSICAL_DISK_VALUE_TEXT_CLASS}
+ title={getPhysicalDiskParentLabel(data)}
+ >
+ {getPhysicalDiskParentLabel(data)}
+ </span>
+ </Show>
+ </TableCell>
- <TableCell class={PHYSICAL_DISK_CELL_HEALTH_CLASS}>
- <div class={PHYSICAL_DISK_HEALTH_WRAP_CLASS}>
- <span class={`${PHYSICAL_DISK_HEALTH_LABEL_CLASS} ${status.tone}`}>
- {status.label}
- </span>
- <Show when={healthSummary}>
- <span
- class={PHYSICAL_DISK_HEALTH_SUMMARY_CLASS}
- title={healthSummary}
- >
- {healthSummary}
- </span>
- </Show>
- </div>
- </TableCell>
+ <TableCell class={PHYSICAL_DISK_CELL_HEALTH_CLASS}>
+ <div class={PHYSICAL_DISK_HEALTH_WRAP_CLASS}>
+ <span class={`${PHYSICAL_DISK_HEALTH_LABEL_CLASS} ${status.tone}`}>
+ {status.label}
+ </span>
+ <Show when={healthSummary}>
+ <span class={PHYSICAL_DISK_HEALTH_SUMMARY_CLASS} title={healthSummary}>
+ {healthSummary}
+ </span>
+ </Show>
+ </div>
+ </TableCell>
+
+ <TableCell class={PHYSICAL_DISK_CELL_TEMP_CLASS}>
+ <span
+ class={`${PHYSICAL_DISK_TEMPERATURE_CLASS} ${getTemperatureTextClass(data.temperature)}`}
+ >
+ {data.temperature > 0 ? formatTemperature(data.temperature) : '—'}
+ </span>
+ </TableCell>
- <TableCell class={PHYSICAL_DISK_CELL_TEMP_CLASS}>
+ <TableCell class={PHYSICAL_DISK_CELL_SIZE_CLASS}>
+ <Show
+ when={data.size > 0}
+ fallback={
<span
- class={`${PHYSICAL_DISK_TEMPERATURE_CLASS} ${getTemperatureTextClass(data.temperature)}`}
+ class={PHYSICAL_DISK_MUTED_PLACEHOLDER_CLASS}
+ title="Disk size not reported by SMART/agent"
>
- {data.temperature > 0 ? formatTemperature(data.temperature) : '—'}
+ —
</span>
- </TableCell>
-
- <TableCell class={PHYSICAL_DISK_CELL_SIZE_CLASS}>
- <Show
- when={data.size > 0}
- fallback={
- <span
- class={PHYSICAL_DISK_MUTED_PLACEHOLDER_CLASS}
- title="Disk size not reported by SMART/agent"
- >
- —
- </span>
- }
- >
- <span class={PHYSICAL_DISK_SIZE_VALUE_CLASS}>
- {formatBytes(data.size)}
- </span>
- </Show>
- </TableCell>
- </TableRow>
- <Show when={isSelected()}>
- <TableRow data-inline-detail-for={summarySeriesId}>
- <TableCell
- id={detailControlsId}
- colSpan={8}
- class={PHYSICAL_DISK_DETAIL_ROW_CELL_CLASS}
- >
- <DiskDetail disk={disk} nodes={props.nodes} />
- </TableCell>
- </TableRow>
+ }
+ >
+ <span class={PHYSICAL_DISK_SIZE_VALUE_CLASS}>
+ {formatBytes(data.size)}
+ </span>
</Show>
- </>
- );
- }}
- </For>
- </TableBody>
- </Table>
- </div>
- </Card>
+ </TableCell>
+ </TableRow>
+ <Show when={isSelected()}>
+ <TableRow data-inline-detail-for={summarySeriesId}>
+ <TableCell
+ id={detailControlsId}
+ colSpan={8}
+ class={PHYSICAL_DISK_DETAIL_ROW_CELL_CLASS}
+ >
+ <DiskDetail disk={disk} nodes={props.nodes} />
+ </TableCell>
+ </TableRow>
+ </Show>
+ </>
+ );
+ }}
+ </For>
+ </TableBody>
+ </Table>
</Show>
</div>
);
diff --git a/frontend-modern/src/components/Storage/StoragePoolsTable.tsx b/frontend-modern/src/components/Storage/StoragePoolsTable.tsx
index 60950c02c1..a3363a1b80 100644
--- a/frontend-modern/src/components/Storage/StoragePoolsTable.tsx
+++ b/frontend-modern/src/components/Storage/StoragePoolsTable.tsx
@@ -8,7 +8,6 @@ import {
STORAGE_POOLS_EMPTY_STATE_CLASS,
STORAGE_POOLS_HEADER_ROW_CLASS,
STORAGE_POOLS_LOADING_STATE_CLASS,
- STORAGE_POOLS_SCROLL_WRAP_CLASS,
STORAGE_POOLS_TABLE_CLASS,
} from '@/features/storageBackups/storagePagePresentation';
import { resolveStorageRecordMetricResourceId } from '@/features/storageBackups/storageMetricsIdentity';
@@ -69,100 +68,98 @@ export const StoragePoolsTable: Component<StoragePoolsTableProps> = (props) => {
<div class={STORAGE_POOLS_EMPTY_STATE_CLASS}>{getStorageEmptyStateMessage()}</div>
}
>
- <div class={STORAGE_POOLS_SCROLL_WRAP_CLASS}>
- <Table class={STORAGE_POOLS_TABLE_CLASS}>
- <colgroup>
+ <Table class={STORAGE_POOLS_TABLE_CLASS}>
+ <colgroup>
+ <For each={getStoragePoolTableColumns(props.storageGrowthColumnLabel)}>
+ {(column) => <col class={column.colClassName} />}
+ </For>
+ </colgroup>
+ <TableHeader>
+ <TableRow class={STORAGE_POOLS_HEADER_ROW_CLASS}>
<For each={getStoragePoolTableColumns(props.storageGrowthColumnLabel)}>
- {(column) => <col class={column.colClassName} />}
+ {(column) => (
+ <TableHead
+ class={column.className}
+ aria-label={column.label}
+ title={column.label}
+ >
+ <span aria-hidden="true" class="hidden xl:inline">
+ {column.label}
+ </span>
+ <span aria-hidden="true" class="xl:hidden">
+ {column.compactLabel}
+ </span>
+ </TableHead>
+ )}
</For>
- </colgroup>
- <TableHeader>
- <TableRow class={STORAGE_POOLS_HEADER_ROW_CLASS}>
- <For each={getStoragePoolTableColumns(props.storageGrowthColumnLabel)}>
- {(column) => (
- <TableHead
- class={column.className}
- aria-label={column.label}
- title={column.label}
- >
- <span aria-hidden="true" class="hidden xl:inline">
- {column.label}
- </span>
- <span aria-hidden="true" class="xl:hidden">
- {column.compactLabel}
- </span>
- </TableHead>
- )}
- </For>
- </TableRow>
- </TableHeader>
- <TableBody class={STORAGE_POOLS_BODY_CLASS}>
- <For each={model.groups()}>
- {(group) => (
- <>
- <Show when={group.showHeader}>
- {(() => {
- const groupSummaryScope = buildStorageSummaryGroupScope(
- group,
- props.groupBy,
- );
+ </TableRow>
+ </TableHeader>
+ <TableBody class={STORAGE_POOLS_BODY_CLASS}>
+ <For each={model.groups()}>
+ {(group) => (
+ <>
+ <Show when={group.showHeader}>
+ {(() => {
+ const groupSummaryScope = buildStorageSummaryGroupScope(
+ group,
+ props.groupBy,
+ );
+ return (
+ <StorageGroupRow
+ group={group}
+ groupBy={props.groupBy}
+ expanded={group.expanded}
+ onToggle={() => props.toggleGroup(group.key)}
+ summaryGroupScope={groupSummaryScope}
+ summaryActive={
+ props.activeSummaryGroupScope?.id === groupSummaryScope?.id
+ }
+ summaryFocused={props.focusedSummaryGroupId === groupSummaryScope?.id}
+ onFocusChange={props.onGroupFocusChange}
+ onHoverChange={props.onGroupHoverChange}
+ />
+ );
+ })()}
+ </Show>
+ <Show when={group.expanded}>
+ <Index each={group.items}>
+ {(record) => {
+ const rowModel = () => model.buildRowModel(record().id, record());
+
return (
- <StorageGroupRow
- group={group}
- groupBy={props.groupBy}
- expanded={group.expanded}
- onToggle={() => props.toggleGroup(group.key)}
- summaryGroupScope={groupSummaryScope}
- summaryActive={
- props.activeSummaryGroupScope?.id === groupSummaryScope?.id
+ <StoragePoolRow
+ record={record()}
+ growthDelta={
+ props.storageGrowthBySeriesId.get(
+ resolveStorageRecordMetricResourceId(record()),
+ ) ?? null
+ }
+ summarySeriesId={resolveStorageRecordMetricResourceId(record())}
+ expanded={rowModel().expanded}
+ summaryHighlighted={
+ props.highlightedSummarySeriesId ===
+ resolveStorageRecordMetricResourceId(record())
}
- summaryFocused={props.focusedSummaryGroupId === groupSummaryScope?.id}
- onFocusChange={props.onGroupFocusChange}
- onHoverChange={props.onGroupHoverChange}
+ summaryGroupMemberState={resolveSummaryGroupMemberInteractionState({
+ seriesId: resolveStorageRecordMetricResourceId(record()),
+ hoveredGroupScope: props.hoveredSummaryGroupScope,
+ focusedGroupScope: props.focusedSummaryGroupScope,
+ })}
+ onToggleExpand={() => model.togglePool(record().id)}
+ onHoverChange={props.onHoverChange}
+ rowClass={rowModel().rowClass}
+ physicalDisks={props.physicalDisks}
+ alertDataAttrs={rowModel().alertDataAttrs}
/>
);
- })()}
- </Show>
- <Show when={group.expanded}>
- <Index each={group.items}>
- {(record) => {
- const rowModel = () => model.buildRowModel(record().id, record());
-
- return (
- <StoragePoolRow
- record={record()}
- growthDelta={
- props.storageGrowthBySeriesId.get(
- resolveStorageRecordMetricResourceId(record()),
- ) ?? null
- }
- summarySeriesId={resolveStorageRecordMetricResourceId(record())}
- expanded={rowModel().expanded}
- summaryHighlighted={
- props.highlightedSummarySeriesId ===
- resolveStorageRecordMetricResourceId(record())
- }
- summaryGroupMemberState={resolveSummaryGroupMemberInteractionState({
- seriesId: resolveStorageRecordMetricResourceId(record()),
- hoveredGroupScope: props.hoveredSummaryGroupScope,
- focusedGroupScope: props.focusedSummaryGroupScope,
- })}
- onToggleExpand={() => model.togglePool(record().id)}
- onHoverChange={props.onHoverChange}
- rowClass={rowModel().rowClass}
- physicalDisks={props.physicalDisks}
- alertDataAttrs={rowModel().alertDataAttrs}
- />
- );
- }}
- </Index>
- </Show>
- </>
- )}
- </For>
- </TableBody>
- </Table>
- </div>
+ }}
+ </Index>
+ </Show>
+ </>
+ )}
+ </For>
+ </TableBody>
+ </Table>
</Show>
}
>
diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
index eb06b982b3..a281441beb 100644
--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
@@ -524,6 +524,8 @@ describe('shared primitive guardrails', () => {
alertHistoryTableSectionSource,
workloadsTableSource,
storagePoolsTableSource,
+ diskListSource,
+ infrastructureSourceManagerSource,
]) {
expect(source).toContain('<Table');
expect(source).not.toContain('<div class="overflow-x-auto">');
@@ -554,6 +556,9 @@ describe('shared primitive guardrails', () => {
expect(alertHistoryTableSectionSource).not.toContain(
'overflow-hidden rounded border border-border',
);
+ expect(storagePoolsTableSource).not.toContain('STORAGE_POOLS_SCROLL_WRAP_CLASS');
+ expect(diskListSource).not.toContain("from '@/components/shared/Card'");
+ expect(diskListSource).not.toContain('PHYSICAL_DISK_TABLE_SCROLL_CLASS');
expect(recoveryProtectedInventorySectionSource).toContain('wrapperClass="bg-surface"');
expect(storageContentCardSource).toContain('<StoragePoolsTable');
});
diff --git a/frontend-modern/src/features/storageBackups/__tests__/storagePagePresentation.test.ts b/frontend-modern/src/features/storageBackups/__tests__/storagePagePresentation.test.ts
index f3dc77c59b..05f161e25c 100644
--- a/frontend-modern/src/features/storageBackups/__tests__/storagePagePresentation.test.ts
+++ b/frontend-modern/src/features/storageBackups/__tests__/storagePagePresentation.test.ts
@@ -23,7 +23,6 @@ import {
STORAGE_POOLS_EMPTY_STATE_CLASS,
STORAGE_POOLS_HEADER_ROW_CLASS,
STORAGE_POOLS_LOADING_STATE_CLASS,
- STORAGE_POOLS_SCROLL_WRAP_CLASS,
STORAGE_POOLS_TABLE_CLASS,
STORAGE_VIEW_OPTIONS,
shouldShowCephSummaryCard,
@@ -74,7 +73,6 @@ describe('storagePagePresentation', () => {
expect(STORAGE_CONTENT_CARD_BODY_CLASS).toBe('p-2');
expect(STORAGE_POOLS_EMPTY_STATE_CLASS).toBe('p-6 text-sm text-muted');
expect(STORAGE_POOLS_LOADING_STATE_CLASS).toBe('p-6 text-sm text-muted');
- expect(STORAGE_POOLS_SCROLL_WRAP_CLASS).toBe('overflow-x-auto');
expect(STORAGE_POOLS_TABLE_CLASS).toBe('w-full table-fixed text-xs');
expect(STORAGE_POOLS_HEADER_ROW_CLASS).toContain('bg-surface-alt');
expect(STORAGE_POOLS_BODY_CLASS).toBe('divide-y divide-border');
diff --git a/frontend-modern/src/features/storageBackups/diskPresentation.ts b/frontend-modern/src/features/storageBackups/diskPresentation.ts
index b1ee98ee5e..0a23082bdf 100644
--- a/frontend-modern/src/features/storageBackups/diskPresentation.ts
+++ b/frontend-modern/src/features/storageBackups/diskPresentation.ts
@@ -84,7 +84,6 @@ export const PHYSICAL_DISK_EMPTY_REQUIREMENTS_NOTE_CLASS =
const PHYSICAL_DISK_TABLE_HEADER_CLASS =
'overflow-hidden text-ellipsis whitespace-nowrap px-1 sm:px-1.5 lg:px-2 py-0.5 text-left text-[10px] sm:text-[11px] lg:text-xs font-medium uppercase tracking-wider';
-export const PHYSICAL_DISK_TABLE_SCROLL_CLASS = 'overflow-x-auto';
export const PHYSICAL_DISK_TABLE_CLASS = 'w-full table-fixed text-xs';
export const PHYSICAL_DISK_TABLE_HEADER_ROW_CLASS =
'border-b border-border bg-surface-alt text-muted';
diff --git a/frontend-modern/src/features/storageBackups/storagePagePresentation.ts b/frontend-modern/src/features/storageBackups/storagePagePresentation.ts
index 3c913abe1f..2975674252 100644
--- a/frontend-modern/src/features/storageBackups/storagePagePresentation.ts
+++ b/frontend-modern/src/features/storageBackups/storagePagePresentation.ts
@@ -97,7 +97,6 @@ export const STORAGE_CONTENT_CARD_BODY_CLASS = 'p-2';
export const STORAGE_POOLS_EMPTY_STATE_CLASS = 'p-6 text-sm text-muted';
export const STORAGE_POOLS_LOADING_STATE_CLASS = 'p-6 text-sm text-muted';
-export const STORAGE_POOLS_SCROLL_WRAP_CLASS = 'overflow-x-auto';
export const STORAGE_POOLS_TABLE_CLASS = 'w-full table-fixed text-xs';
export const STORAGE_POOLS_HEADER_ROW_CLASS = 'bg-surface-alt text-muted border-b border-border';
export const STORAGE_POOLS_BODY_CLASS = 'divide-y divide-border';
diff --git a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
index 0373c70a41..5ba0702158 100644
--- a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
+++ b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
@@ -1695,6 +1695,8 @@ describe('frontend resource type boundaries', () => {
expect(diskListSource).not.toContain('Physical disk monitoring requirements:');
expect(diskListSource).toContain('useDiskListModel');
expect(diskListSource).toContain('PHYSICAL_DISK_TABLE_CLASS');
+ expect(diskListSource).not.toContain("from '@/components/shared/Card'");
+ expect(diskListSource).not.toContain('PHYSICAL_DISK_TABLE_SCROLL_CLASS');
expect(diskListSource).not.toContain('cursor-pointer transition-colors');
expect(diskListSource).not.toContain('function extractDiskData(');
expect(diskListSource).not.toContain('const filteredDisks = createMemo(() => {');
@@ -2022,6 +2024,7 @@ describe('frontend resource type boundaries', () => {
expect(storageContentCardSource).toContain('TableCardHeader');
expect(storageContentCardSource).toContain('STORAGE_CONTENT_CARD_BODY_CLASS');
expect(storagePoolsTableSource).toMatch(/<Table(?:\s|>)/);
+ expect(storagePoolsTableSource).not.toContain('STORAGE_POOLS_SCROLL_WRAP_CLASS');
expect(storagePoolsTableSource).not.toContain('<div class="overflow-x-auto">');
expect(storagePoolsTableSource).not.toContain(
'<div class="overflow-x-auto bg-surface">',