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 configured-node table shell

rcourtman7b43777d7a9b
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
index 55de73feef..daa8cfde94 100644
--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
@@ -148,6 +148,12 @@ 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.
+Configured-node settings tables follow the same boundary:
+`frontend-modern/src/components/Settings/ConfiguredNodeTables.tsx` may own node,
+credential, capability, status, and action cells, but table scroll framing must
+stay on the shared `Table` primitive. If a configured-node table needs bounded
+vertical height, apply it through `Table` `wrapperClass` instead of an outer
+lifecycle-local scroll container.
## 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 4bb0f1e892..43f508fa5d 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -184,8 +184,10 @@ work extends shared components instead of creating new local variants.
history, still use `TableCard` for the outer frame instead of hand-coded
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.
+ settings source/configured-node tables, must use `Table` directly rather than
+ nesting another card or scroll wrapper. If a framed table needs bounded
+ vertical height, that constraint belongs on `Table.wrapperClass` so the
+ shared table shell still owns overflow behavior.
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/frontend-modern/src/components/Settings/ConfiguredNodeTables.tsx b/frontend-modern/src/components/Settings/ConfiguredNodeTables.tsx
index a55cb217b6..7b5a2ad618 100644
--- a/frontend-modern/src/components/Settings/ConfiguredNodeTables.tsx
+++ b/frontend-modern/src/components/Settings/ConfiguredNodeTables.tsx
@@ -18,9 +18,7 @@ import {
TableHead,
TableCell,
} from '@/components/shared/Table';
-import {
- getStatusIndicatorBadgeToneClasses,
-} from '@/utils/status';
+import { getStatusIndicatorBadgeToneClasses } from '@/utils/status';
import { getConfiguredNodeCapabilityBadges } from '@/utils/configuredNodeCapabilityPresentation';
interface PveNodesTableProps {
@@ -36,255 +34,250 @@ interface PveNodesTableProps {
export const PveNodesTable: Component<PveNodesTableProps> = (props) => {
return (
<Card padding="none" tone="card" class="rounded-md">
- <div class="overflow-auto max-h-[600px]">
- <Table class="min-w-[max-content] w-full divide-y divide-border text-sm">
- <TableHeader class="bg-surface-alt">
- <TableRow>
- <TableHead class="py-2 pl-4 pr-3 text-left text-xs font-semibold uppercase tracking-wide text-muted">
- Node
- </TableHead>
- <TableHead class="px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">
- Credentials
- </TableHead>
- <TableHead class="px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">
- Capabilities
- </TableHead>
- <TableHead class="px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">
- Status
- </TableHead>
- <TableHead class="px-3 py-2 text-right text-xs font-semibold uppercase tracking-wide text-muted">
- Actions
- </TableHead>
- </TableRow>
- </TableHeader>
- <TableBody class="divide-y divide-border bg-surface">
- <For each={props.nodes}>
- {(node) => {
- const statusIndicator = createMemo(() =>
- resolveConfiguredPveNodeStatusIndicator(node, props.stateNodes),
- );
- const capabilityBadges = createMemo(() =>
- getConfiguredNodeCapabilityBadges(
- node,
- props.globalTemperatureMonitoringEnabled ?? true,
- ),
- );
- const clusterEndpoints = createMemo(() =>
- 'clusterEndpoints' in node && node.clusterEndpoints ? node.clusterEndpoints : [],
- );
- const clusterName = createMemo(() =>
- 'clusterName' in node && node.clusterName ? node.clusterName : 'Unknown',
- );
- return (
- <TableRow class="even:bg-surface-alt hover:bg-blue-50 dark:hover:bg-blue-900 transition-colors">
- <TableCell class="align-top py-3 pl-4 pr-3">
- <div class="min-w-0 space-y-1">
- <div class="flex items-start gap-3">
- <StatusDot
- variant={statusIndicator().variant}
- size="md"
- ariaHidden={true}
- class="mt-1.5"
- />
- <div class="min-w-0 flex-1">
- <p class="font-medium text-base-content truncate">{node.name}</p>
- <p class="text-xs text-muted truncate">{node.host}</p>
- </div>
+ <Table
+ wrapperClass="max-h-[600px] overflow-y-auto"
+ class="min-w-[max-content] w-full divide-y divide-border text-sm"
+ >
+ <TableHeader class="bg-surface-alt">
+ <TableRow>
+ <TableHead class="py-2 pl-4 pr-3 text-left text-xs font-semibold uppercase tracking-wide text-muted">
+ Node
+ </TableHead>
+ <TableHead class="px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">
+ Credentials
+ </TableHead>
+ <TableHead class="px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">
+ Capabilities
+ </TableHead>
+ <TableHead class="px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">
+ Status
+ </TableHead>
+ <TableHead class="px-3 py-2 text-right text-xs font-semibold uppercase tracking-wide text-muted">
+ Actions
+ </TableHead>
+ </TableRow>
+ </TableHeader>
+ <TableBody class="divide-y divide-border bg-surface">
+ <For each={props.nodes}>
+ {(node) => {
+ const statusIndicator = createMemo(() =>
+ resolveConfiguredPveNodeStatusIndicator(node, props.stateNodes),
+ );
+ const capabilityBadges = createMemo(() =>
+ getConfiguredNodeCapabilityBadges(
+ node,
+ props.globalTemperatureMonitoringEnabled ?? true,
+ ),
+ );
+ const clusterEndpoints = createMemo(() =>
+ 'clusterEndpoints' in node && node.clusterEndpoints ? node.clusterEndpoints : [],
+ );
+ const clusterName = createMemo(() =>
+ 'clusterName' in node && node.clusterName ? node.clusterName : 'Unknown',
+ );
+ return (
+ <TableRow class="even:bg-surface-alt hover:bg-blue-50 dark:hover:bg-blue-900 transition-colors">
+ <TableCell class="align-top py-3 pl-4 pr-3">
+ <div class="min-w-0 space-y-1">
+ <div class="flex items-start gap-3">
+ <StatusDot
+ variant={statusIndicator().variant}
+ size="md"
+ ariaHidden={true}
+ class="mt-1.5"
+ />
+ <div class="min-w-0 flex-1">
+ <p class="font-medium text-base-content truncate">{node.name}</p>
+ <p class="text-xs text-muted truncate">{node.host}</p>
</div>
- <Show when={node.type === 'pve' && 'isCluster' in node && node.isCluster}>
- <div class="rounded-md border border-border bg-surface-alt px-3 py-2 space-y-2">
- <div class="flex items-center gap-2 text-xs font-semibold text-base-content">
- <span>{clusterName()} Cluster</span>
- <span class="ml-auto text-[0.65rem] font-normal text-slate-500">
- {clusterEndpoints().length} nodes
- </span>
- </div>
- <Show when={clusterEndpoints().length > 0}>
- <div class="flex flex-col gap-2">
- <For each={clusterEndpoints()}>
- {(endpoint) => {
- const endpointPresentation =
- getClusterEndpointPresentation(endpoint);
+ </div>
+ <Show when={node.type === 'pve' && 'isCluster' in node && node.isCluster}>
+ <div class="rounded-md border border-border bg-surface-alt px-3 py-2 space-y-2">
+ <div class="flex items-center gap-2 text-xs font-semibold text-base-content">
+ <span>{clusterName()} Cluster</span>
+ <span class="ml-auto text-[0.65rem] font-normal text-slate-500">
+ {clusterEndpoints().length} nodes
+ </span>
+ </div>
+ <Show when={clusterEndpoints().length > 0}>
+ <div class="flex flex-col gap-2">
+ <For each={clusterEndpoints()}>
+ {(endpoint) => {
+ const endpointPresentation =
+ getClusterEndpointPresentation(endpoint);
- return (
- <div
- class={`rounded border px-3 py-2 text-[0.7rem] ${endpointPresentation.panelClass}`}
- >
- <div class="flex items-center gap-2 mb-1">
- <span class="font-semibold">{endpoint.nodeName}</span>
- <span class="text-[0.65rem] opacity-75">
- {endpoint.ip}
- </span>
+ return (
+ <div
+ class={`rounded border px-3 py-2 text-[0.7rem] ${endpointPresentation.panelClass}`}
+ >
+ <div class="flex items-center gap-2 mb-1">
+ <span class="font-semibold">{endpoint.nodeName}</span>
+ <span class="text-[0.65rem] opacity-75">{endpoint.ip}</span>
+ </div>
+ <div class="flex flex-col gap-0.5 text-[0.65rem] opacity-90">
+ <div class="flex items-center gap-1.5">
+ <span class="w-16 font-medium">Proxmox:</span>
+ <span>{endpointPresentation.proxmoxLabel}</span>
</div>
- <div class="flex flex-col gap-0.5 text-[0.65rem] opacity-90">
- <div class="flex items-center gap-1.5">
- <span class="w-16 font-medium">Proxmox:</span>
- <span>{endpointPresentation.proxmoxLabel}</span>
- </div>
- <div class="flex items-center gap-1.5">
- <span class="w-16 font-medium">Pulse:</span>
- <span>{endpointPresentation.pulseLabel}</span>
- </div>
- <Show
- when={
- endpointPresentation.pulseStatus === 'unreachable' &&
- endpoint.pulseError
- }
- >
- <div class="mt-1 pt-1 border-t border-current opacity-20">
- <span class="font-medium">Error: </span>
- <span class="opacity-80">{endpoint.pulseError}</span>
- </div>
- </Show>
+ <div class="flex items-center gap-1.5">
+ <span class="w-16 font-medium">Pulse:</span>
+ <span>{endpointPresentation.pulseLabel}</span>
</div>
+ <Show
+ when={
+ endpointPresentation.pulseStatus === 'unreachable' &&
+ endpoint.pulseError
+ }
+ >
+ <div class="mt-1 pt-1 border-t border-current opacity-20">
+ <span class="font-medium">Error: </span>
+ <span class="opacity-80">{endpoint.pulseError}</span>
+ </div>
+ </Show>
</div>
- );
- }}
- </For>
- </div>
- </Show>
- <div class="flex items-center justify-between gap-2">
- <p class="flex items-center gap-1 text-[0.7rem] text-muted">
+ </div>
+ );
+ }}
+ </For>
+ </div>
+ </Show>
+ <div class="flex items-center justify-between gap-2">
+ <p class="flex items-center gap-1 text-[0.7rem] text-muted">
+ <svg
+ width="14"
+ height="14"
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ stroke-width="2"
+ >
+ <path d="M5 12h14M12 5l7 7-7 7" />
+ </svg>
+ Automatic failover enabled
+ </p>
+ <Show when={props.onRefreshCluster}>
+ <button
+ type="button"
+ onClick={() => props.onRefreshCluster?.(node.id)}
+ class="flex min-h-10 sm:min-h-9 items-center gap-1 px-2.5 py-1.5 text-xs font-medium hover:text-muted bg-surface border border-border rounded hover:bg-surface-hover transition-colors"
+ title="Re-detect cluster membership (use if nodes were added to the Proxmox cluster)"
+ >
<svg
- width="14"
- height="14"
+ width="12"
+ height="12"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
>
- <path d="M5 12h14M12 5l7 7-7 7" />
+ <polyline points="23 4 23 10 17 10"></polyline>
+ <polyline points="1 20 1 14 7 14"></polyline>
+ <path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path>
</svg>
- Automatic failover enabled
- </p>
- <Show when={props.onRefreshCluster}>
- <button
- type="button"
- onClick={() => props.onRefreshCluster?.(node.id)}
- class="flex min-h-10 sm:min-h-9 items-center gap-1 px-2.5 py-1.5 text-xs font-medium hover:text-muted bg-surface border border-border rounded hover:bg-surface-hover transition-colors"
- title="Re-detect cluster membership (use if nodes were added to the Proxmox cluster)"
- >
- <svg
- width="12"
- height="12"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- stroke-width="2"
- >
- <polyline points="23 4 23 10 17 10"></polyline>
- <polyline points="1 20 1 14 7 14"></polyline>
- <path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path>
- </svg>
- Refresh
- </button>
- </Show>
- </div>
+ Refresh
+ </button>
+ </Show>
</div>
- </Show>
- </div>
- </TableCell>
- <TableCell class="align-top px-3 py-3">
- <div class="flex flex-col gap-1">
- <span class="text-xs text-muted">
- {node.user ? `User: ${node.user}` : `Token: ${node.tokenName}`}
+ </div>
+ </Show>
+ </div>
+ </TableCell>
+ <TableCell class="align-top px-3 py-3">
+ <div class="flex flex-col gap-1">
+ <span class="text-xs text-muted">
+ {node.user ? `User: ${node.user}` : `Token: ${node.tokenName}`}
+ </span>
+ <Show when={node.source === 'agent'}>
+ <span class="inline-flex items-center gap-1 text-[0.65rem] px-1.5 py-0.5 bg-surface-hover text-base-content rounded w-fit">
+ <span class="h-1.5 w-1.5 rounded-full bg-slate-500"></span>
+ Agent-linked
</span>
- <Show when={node.source === 'agent'}>
- <span class="inline-flex items-center gap-1 text-[0.65rem] px-1.5 py-0.5 bg-surface-hover text-base-content rounded w-fit">
- <span class="h-1.5 w-1.5 rounded-full bg-slate-500"></span>
- Agent-linked
- </span>
- </Show>
- <Show when={node.source === 'script' || (!node.source && node.tokenName)}>
- <span class="text-[0.65rem] px-1.5 py-0.5 bg-surface-alt text-muted rounded w-fit">
- Direct-linked
- </span>
- </Show>
- </div>
- </TableCell>
- <TableCell class="align-top px-3 py-3">
- <div class="flex flex-wrap gap-1">
- <For each={capabilityBadges()}>
- {(badge) => <span class={badge.className}>{badge.label}</span>}
- </For>
- </div>
- </TableCell>
- <TableCell class="align-top px-3 py-3 whitespace-nowrap">
- <span
- class={`inline-flex items-center gap-2 text-xs font-medium ${getStatusIndicatorBadgeToneClasses(statusIndicator().variant)}`}
+ </Show>
+ <Show when={node.source === 'script' || (!node.source && node.tokenName)}>
+ <span class="text-[0.65rem] px-1.5 py-0.5 bg-surface-alt text-muted rounded w-fit">
+ Direct-linked
+ </span>
+ </Show>
+ </div>
+ </TableCell>
+ <TableCell class="align-top px-3 py-3">
+ <div class="flex flex-wrap gap-1">
+ <For each={capabilityBadges()}>
+ {(badge) => <span class={badge.className}>{badge.label}</span>}
+ </For>
+ </div>
+ </TableCell>
+ <TableCell class="align-top px-3 py-3 whitespace-nowrap">
+ <span
+ class={`inline-flex items-center gap-2 text-xs font-medium ${getStatusIndicatorBadgeToneClasses(statusIndicator().variant)}`}
+ >
+ <StatusDot variant={statusIndicator().variant} size="sm" ariaHidden={true} />
+ {statusIndicator().label}
+ </span>
+ </TableCell>
+ <TableCell class="align-top px-3 py-3">
+ <div class="flex items-center justify-end gap-1 sm:gap-2">
+ <button
+ type="button"
+ onClick={() => props.onTestConnection(node.id)}
+ class="min-h-10 sm:min-h-9 min-w-10 sm:min-w-9 p-2.5 text-muted hover:text-base-content"
+ title="Test connection"
>
- <StatusDot
- variant={statusIndicator().variant}
- size="sm"
- ariaHidden={true}
- />
- {statusIndicator().label}
- </span>
- </TableCell>
- <TableCell class="align-top px-3 py-3">
- <div class="flex items-center justify-end gap-1 sm:gap-2">
- <button
- type="button"
- onClick={() => props.onTestConnection(node.id)}
- class="min-h-10 sm:min-h-9 min-w-10 sm:min-w-9 p-2.5 text-muted hover:text-base-content"
- title="Test connection"
+ <svg
+ width="16"
+ height="16"
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ stroke-width="2"
>
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- stroke-width="2"
- >
- <polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>
- </svg>
- </button>
- <button
- type="button"
- onClick={() => props.onEdit(node)}
- class="min-h-10 sm:min-h-9 min-w-10 sm:min-w-9 p-2.5 text-muted hover:text-base-content"
- title="Edit node"
+ <polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>
+ </svg>
+ </button>
+ <button
+ type="button"
+ onClick={() => props.onEdit(node)}
+ class="min-h-10 sm:min-h-9 min-w-10 sm:min-w-9 p-2.5 text-muted hover:text-base-content"
+ title="Edit node"
+ >
+ <svg
+ width="16"
+ height="16"
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ stroke-width="2"
>
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- stroke-width="2"
- >
- <path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"></path>
- <path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"></path>
- </svg>
- </button>
- <button
- type="button"
- onClick={() => props.onDelete(node)}
- class="min-h-10 sm:min-h-9 min-w-10 sm:min-w-9 p-2.5 text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300"
- title="Delete node"
+ <path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"></path>
+ <path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"></path>
+ </svg>
+ </button>
+ <button
+ type="button"
+ onClick={() => props.onDelete(node)}
+ class="min-h-10 sm:min-h-9 min-w-10 sm:min-w-9 p-2.5 text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300"
+ title="Delete node"
+ >
+ <svg
+ width="16"
+ height="16"
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ stroke-width="2"
>
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- stroke-width="2"
- >
- <polyline points="3 6 5 6 21 6"></polyline>
- <path d="M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"></path>
- </svg>
- </button>
- </div>
- </TableCell>
- </TableRow>
- );
- }}
- </For>
- </TableBody>
- </Table>
- </div>
+ <polyline points="3 6 5 6 21 6"></polyline>
+ <path d="M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"></path>
+ </svg>
+ </button>
+ </div>
+ </TableCell>
+ </TableRow>
+ );
+ }}
+ </For>
+ </TableBody>
+ </Table>
</Card>
);
};
@@ -301,158 +294,152 @@ interface PbsNodesTableProps {
export const PbsNodesTable: Component<PbsNodesTableProps> = (props) => {
return (
<Card padding="none" tone="card" class="rounded-md">
- <div class="overflow-x-auto">
- <Table class="min-w-[max-content] divide-y divide-border text-sm">
- <TableHeader class="bg-surface-alt">
- <TableRow>
- <TableHead class="py-2 pl-4 pr-3 text-left text-xs font-semibold uppercase tracking-wide text-muted">
- Node
- </TableHead>
- <TableHead class="px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">
- Credentials
- </TableHead>
- <TableHead class="px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">
- Capabilities
- </TableHead>
- <TableHead class="px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">
- Status
- </TableHead>
- <TableHead class="px-3 py-2 text-right text-xs font-semibold uppercase tracking-wide text-muted">
- Actions
- </TableHead>
- </TableRow>
- </TableHeader>
- <TableBody class="divide-y divide-border bg-surface">
- <For each={props.nodes}>
- {(node) => {
- const statusIndicator = createMemo(() =>
- resolveConfiguredInstanceStatusIndicator(node, props.statePbs),
- );
- const capabilityBadges = createMemo(() =>
- getConfiguredNodeCapabilityBadges(
- node,
- props.globalTemperatureMonitoringEnabled ?? true,
- ),
- );
- return (
- <TableRow class="even:bg-surface-alt hover:bg-blue-50 dark:hover:bg-blue-900 transition-colors">
- <TableCell class="align-top py-3 pl-4 pr-3">
- <div class="min-w-0 space-y-1">
- <div class="flex items-start gap-3">
- <StatusDot
- variant={statusIndicator().variant}
- size="md"
- ariaHidden={true}
- class="mt-1.5"
- />
- <div class="min-w-0 flex-1">
- <p class="font-medium text-base-content truncate">{node.name}</p>
- <p class="text-xs text-muted truncate">{node.host}</p>
- </div>
- </div>
- </div>
- </TableCell>
- <TableCell class="align-top px-3 py-3">
- <div class="flex flex-col gap-1">
- <span class="text-xs text-muted">
- {node.user ? `User: ${node.user}` : `Token: ${node.tokenName}`}
- </span>
- <Show when={node.source === 'agent'}>
- <span class="inline-flex items-center gap-1 text-[0.65rem] px-1.5 py-0.5 bg-surface-hover text-base-content rounded w-fit">
- <span class="h-1.5 w-1.5 rounded-full bg-slate-500"></span>
- Agent-linked
- </span>
- </Show>
- <Show when={node.source === 'script' || (!node.source && node.tokenName)}>
- <span class="text-[0.65rem] px-1.5 py-0.5 bg-surface-alt text-muted rounded w-fit">
- Direct-linked
- </span>
- </Show>
- </div>
- </TableCell>
- <TableCell class="align-top px-3 py-3">
- <div class="flex flex-wrap gap-1">
- <For each={capabilityBadges()}>
- {(badge) => <span class={badge.className}>{badge.label}</span>}
- </For>
- </div>
- </TableCell>
- <TableCell class="align-top px-3 py-3 whitespace-nowrap">
- <span
- class={`inline-flex items-center gap-2 text-xs font-medium ${getStatusIndicatorBadgeToneClasses(statusIndicator().variant)}`}
- >
+ <Table class="min-w-[max-content] divide-y divide-border text-sm">
+ <TableHeader class="bg-surface-alt">
+ <TableRow>
+ <TableHead class="py-2 pl-4 pr-3 text-left text-xs font-semibold uppercase tracking-wide text-muted">
+ Node
+ </TableHead>
+ <TableHead class="px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">
+ Credentials
+ </TableHead>
+ <TableHead class="px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">
+ Capabilities
+ </TableHead>
+ <TableHead class="px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">
+ Status
+ </TableHead>
+ <TableHead class="px-3 py-2 text-right text-xs font-semibold uppercase tracking-wide text-muted">
+ Actions
+ </TableHead>
+ </TableRow>
+ </TableHeader>
+ <TableBody class="divide-y divide-border bg-surface">
+ <For each={props.nodes}>
+ {(node) => {
+ const statusIndicator = createMemo(() =>
+ resolveConfiguredInstanceStatusIndicator(node, props.statePbs),
+ );
+ const capabilityBadges = createMemo(() =>
+ getConfiguredNodeCapabilityBadges(
+ node,
+ props.globalTemperatureMonitoringEnabled ?? true,
+ ),
+ );
+ return (
+ <TableRow class="even:bg-surface-alt hover:bg-blue-50 dark:hover:bg-blue-900 transition-colors">
+ <TableCell class="align-top py-3 pl-4 pr-3">
+ <div class="min-w-0 space-y-1">
+ <div class="flex items-start gap-3">
<StatusDot
variant={statusIndicator().variant}
- size="sm"
+ size="md"
ariaHidden={true}
+ class="mt-1.5"
/>
- {statusIndicator().label}
+ <div class="min-w-0 flex-1">
+ <p class="font-medium text-base-content truncate">{node.name}</p>
+ <p class="text-xs text-muted truncate">{node.host}</p>
+ </div>
+ </div>
+ </div>
+ </TableCell>
+ <TableCell class="align-top px-3 py-3">
+ <div class="flex flex-col gap-1">
+ <span class="text-xs text-muted">
+ {node.user ? `User: ${node.user}` : `Token: ${node.tokenName}`}
</span>
- </TableCell>
- <TableCell class="align-top px-3 py-3">
- <div class="flex items-center justify-end gap-1 sm:gap-2">
- <button
- type="button"
- onClick={() => props.onTestConnection(node.id)}
- class="min-h-10 sm:min-h-9 min-w-10 sm:min-w-9 p-2.5 text-muted hover:text-base-content"
- title="Test connection"
+ <Show when={node.source === 'agent'}>
+ <span class="inline-flex items-center gap-1 text-[0.65rem] px-1.5 py-0.5 bg-surface-hover text-base-content rounded w-fit">
+ <span class="h-1.5 w-1.5 rounded-full bg-slate-500"></span>
+ Agent-linked
+ </span>
+ </Show>
+ <Show when={node.source === 'script' || (!node.source && node.tokenName)}>
+ <span class="text-[0.65rem] px-1.5 py-0.5 bg-surface-alt text-muted rounded w-fit">
+ Direct-linked
+ </span>
+ </Show>
+ </div>
+ </TableCell>
+ <TableCell class="align-top px-3 py-3">
+ <div class="flex flex-wrap gap-1">
+ <For each={capabilityBadges()}>
+ {(badge) => <span class={badge.className}>{badge.label}</span>}
+ </For>
+ </div>
+ </TableCell>
+ <TableCell class="align-top px-3 py-3 whitespace-nowrap">
+ <span
+ class={`inline-flex items-center gap-2 text-xs font-medium ${getStatusIndicatorBadgeToneClasses(statusIndicator().variant)}`}
+ >
+ <StatusDot variant={statusIndicator().variant} size="sm" ariaHidden={true} />
+ {statusIndicator().label}
+ </span>
+ </TableCell>
+ <TableCell class="align-top px-3 py-3">
+ <div class="flex items-center justify-end gap-1 sm:gap-2">
+ <button
+ type="button"
+ onClick={() => props.onTestConnection(node.id)}
+ class="min-h-10 sm:min-h-9 min-w-10 sm:min-w-9 p-2.5 text-muted hover:text-base-content"
+ title="Test connection"
+ >
+ <svg
+ width="16"
+ height="16"
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ stroke-width="2"
>
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- stroke-width="2"
- >
- <polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>
- </svg>
- </button>
- <button
- type="button"
- onClick={() => props.onEdit(node)}
- class="min-h-10 sm:min-h-9 min-w-10 sm:min-w-9 p-2.5 text-muted hover:text-base-content"
- title="Edit node"
+ <polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>
+ </svg>
+ </button>
+ <button
+ type="button"
+ onClick={() => props.onEdit(node)}
+ class="min-h-10 sm:min-h-9 min-w-10 sm:min-w-9 p-2.5 text-muted hover:text-base-content"
+ title="Edit node"
+ >
+ <svg
+ width="16"
+ height="16"
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ stroke-width="2"
>
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- stroke-width="2"
- >
- <path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"></path>
- <path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"></path>
- </svg>
- </button>
- <button
- type="button"
- onClick={() => props.onDelete(node)}
- class="min-h-10 sm:min-h-9 min-w-10 sm:min-w-9 p-2.5 text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300"
- title="Delete node"
+ <path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"></path>
+ <path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"></path>
+ </svg>
+ </button>
+ <button
+ type="button"
+ onClick={() => props.onDelete(node)}
+ class="min-h-10 sm:min-h-9 min-w-10 sm:min-w-9 p-2.5 text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300"
+ title="Delete node"
+ >
+ <svg
+ width="16"
+ height="16"
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ stroke-width="2"
>
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- stroke-width="2"
- >
- <polyline points="3 6 5 6 21 6"></polyline>
- <path d="M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"></path>
- </svg>
- </button>
- </div>
- </TableCell>
- </TableRow>
- );
- }}
- </For>
- </TableBody>
- </Table>
- </div>
+ <polyline points="3 6 5 6 21 6"></polyline>
+ <path d="M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"></path>
+ </svg>
+ </button>
+ </div>
+ </TableCell>
+ </TableRow>
+ );
+ }}
+ </For>
+ </TableBody>
+ </Table>
</Card>
);
};
@@ -469,158 +456,152 @@ interface PmgNodesTableProps {
export const PmgNodesTable: Component<PmgNodesTableProps> = (props) => {
return (
<Card padding="none" tone="card" class="rounded-md">
- <div class="overflow-x-auto">
- <Table class="min-w-[max-content] divide-y divide-border text-sm">
- <TableHeader class="bg-surface-alt">
- <TableRow>
- <TableHead class="py-2 pl-4 pr-3 text-left text-xs font-semibold uppercase tracking-wide text-muted">
- Node
- </TableHead>
- <TableHead class="px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">
- Credentials
- </TableHead>
- <TableHead class="px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">
- Capabilities
- </TableHead>
- <TableHead class="px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">
- Status
- </TableHead>
- <TableHead class="px-3 py-2 text-right text-xs font-semibold uppercase tracking-wide text-muted">
- Actions
- </TableHead>
- </TableRow>
- </TableHeader>
- <TableBody class="divide-y divide-border bg-surface">
- <For each={props.nodes}>
- {(node) => {
- const statusIndicator = createMemo(() =>
- resolveConfiguredInstanceStatusIndicator(node, props.statePmg),
- );
- const capabilityBadges = createMemo(() =>
- getConfiguredNodeCapabilityBadges(
- node,
- props.globalTemperatureMonitoringEnabled ?? true,
- ),
- );
- return (
- <TableRow class="even:bg-surface-alt hover:bg-blue-50 dark:hover:bg-blue-900 transition-colors">
- <TableCell class="align-top py-3 pl-4 pr-3">
- <div class="min-w-0 space-y-1">
- <div class="flex items-start gap-3">
- <StatusDot
- variant={statusIndicator().variant}
- size="md"
- ariaHidden={true}
- class="mt-1.5"
- />
- <div class="min-w-0 flex-1">
- <p class="font-medium text-base-content truncate">{node.name}</p>
- <p class="text-xs text-muted truncate">{node.host}</p>
- </div>
- </div>
- </div>
- </TableCell>
- <TableCell class="align-top px-3 py-3">
- <div class="flex flex-col gap-1">
- <span class="text-xs text-muted">
- {node.user ? `User: ${node.user}` : `Token: ${node.tokenName}`}
- </span>
- <Show when={node.source === 'agent'}>
- <span class="inline-flex items-center gap-1 text-[0.65rem] px-1.5 py-0.5 bg-surface-hover text-base-content rounded w-fit">
- <span class="h-1.5 w-1.5 rounded-full bg-slate-500"></span>
- Agent-linked
- </span>
- </Show>
- <Show when={node.source === 'script' || (!node.source && node.tokenName)}>
- <span class="text-[0.65rem] px-1.5 py-0.5 bg-surface-alt text-muted rounded w-fit">
- Direct-linked
- </span>
- </Show>
- </div>
- </TableCell>
- <TableCell class="align-top px-3 py-3">
- <div class="flex flex-wrap gap-1">
- <For each={capabilityBadges()}>
- {(badge) => <span class={badge.className}>{badge.label}</span>}
- </For>
- </div>
- </TableCell>
- <TableCell class="align-top px-3 py-3 whitespace-nowrap">
- <span
- class={`inline-flex items-center gap-2 text-xs font-medium ${getStatusIndicatorBadgeToneClasses(statusIndicator().variant)}`}
- >
+ <Table class="min-w-[max-content] divide-y divide-border text-sm">
+ <TableHeader class="bg-surface-alt">
+ <TableRow>
+ <TableHead class="py-2 pl-4 pr-3 text-left text-xs font-semibold uppercase tracking-wide text-muted">
+ Node
+ </TableHead>
+ <TableHead class="px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">
+ Credentials
+ </TableHead>
+ <TableHead class="px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">
+ Capabilities
+ </TableHead>
+ <TableHead class="px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-muted">
+ Status
+ </TableHead>
+ <TableHead class="px-3 py-2 text-right text-xs font-semibold uppercase tracking-wide text-muted">
+ Actions
+ </TableHead>
+ </TableRow>
+ </TableHeader>
+ <TableBody class="divide-y divide-border bg-surface">
+ <For each={props.nodes}>
+ {(node) => {
+ const statusIndicator = createMemo(() =>
+ resolveConfiguredInstanceStatusIndicator(node, props.statePmg),
+ );
+ const capabilityBadges = createMemo(() =>
+ getConfiguredNodeCapabilityBadges(
+ node,
+ props.globalTemperatureMonitoringEnabled ?? true,
+ ),
+ );
+ return (
+ <TableRow class="even:bg-surface-alt hover:bg-blue-50 dark:hover:bg-blue-900 transition-colors">
+ <TableCell class="align-top py-3 pl-4 pr-3">
+ <div class="min-w-0 space-y-1">
+ <div class="flex items-start gap-3">
<StatusDot
variant={statusIndicator().variant}
- size="sm"
+ size="md"
ariaHidden={true}
+ class="mt-1.5"
/>
- {statusIndicator().label}
+ <div class="min-w-0 flex-1">
+ <p class="font-medium text-base-content truncate">{node.name}</p>
+ <p class="text-xs text-muted truncate">{node.host}</p>
+ </div>
+ </div>
+ </div>
+ </TableCell>
+ <TableCell class="align-top px-3 py-3">
+ <div class="flex flex-col gap-1">
+ <span class="text-xs text-muted">
+ {node.user ? `User: ${node.user}` : `Token: ${node.tokenName}`}
</span>
- </TableCell>
- <TableCell class="align-top px-3 py-3">
- <div class="flex items-center justify-end gap-1 sm:gap-2">
- <button
- type="button"
- onClick={() => props.onTestConnection(node.id)}
- class="min-h-10 sm:min-h-9 min-w-10 sm:min-w-9 p-2.5 text-muted hover:text-base-content"
- title="Test connection"
+ <Show when={node.source === 'agent'}>
+ <span class="inline-flex items-center gap-1 text-[0.65rem] px-1.5 py-0.5 bg-surface-hover text-base-content rounded w-fit">
+ <span class="h-1.5 w-1.5 rounded-full bg-slate-500"></span>
+ Agent-linked
+ </span>
+ </Show>
+ <Show when={node.source === 'script' || (!node.source && node.tokenName)}>
+ <span class="text-[0.65rem] px-1.5 py-0.5 bg-surface-alt text-muted rounded w-fit">
+ Direct-linked
+ </span>
+ </Show>
+ </div>
+ </TableCell>
+ <TableCell class="align-top px-3 py-3">
+ <div class="flex flex-wrap gap-1">
+ <For each={capabilityBadges()}>
+ {(badge) => <span class={badge.className}>{badge.label}</span>}
+ </For>
+ </div>
+ </TableCell>
+ <TableCell class="align-top px-3 py-3 whitespace-nowrap">
+ <span
+ class={`inline-flex items-center gap-2 text-xs font-medium ${getStatusIndicatorBadgeToneClasses(statusIndicator().variant)}`}
+ >
+ <StatusDot variant={statusIndicator().variant} size="sm" ariaHidden={true} />
+ {statusIndicator().label}
+ </span>
+ </TableCell>
+ <TableCell class="align-top px-3 py-3">
+ <div class="flex items-center justify-end gap-1 sm:gap-2">
+ <button
+ type="button"
+ onClick={() => props.onTestConnection(node.id)}
+ class="min-h-10 sm:min-h-9 min-w-10 sm:min-w-9 p-2.5 text-muted hover:text-base-content"
+ title="Test connection"
+ >
+ <svg
+ width="16"
+ height="16"
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ stroke-width="2"
>
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- stroke-width="2"
- >
- <polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>
- </svg>
- </button>
- <button
- type="button"
- onClick={() => props.onEdit(node)}
- class="min-h-10 sm:min-h-9 min-w-10 sm:min-w-9 p-2.5 text-muted hover:text-base-content"
- title="Edit node"
+ <polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline>
+ </svg>
+ </button>
+ <button
+ type="button"
+ onClick={() => props.onEdit(node)}
+ class="min-h-10 sm:min-h-9 min-w-10 sm:min-w-9 p-2.5 text-muted hover:text-base-content"
+ title="Edit node"
+ >
+ <svg
+ width="16"
+ height="16"
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ stroke-width="2"
>
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- stroke-width="2"
- >
- <path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"></path>
- <path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"></path>
- </svg>
- </button>
- <button
- type="button"
- onClick={() => props.onDelete(node)}
- class="min-h-10 sm:min-h-9 min-w-10 sm:min-w-9 p-2.5 text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300"
- title="Delete node"
+ <path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"></path>
+ <path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"></path>
+ </svg>
+ </button>
+ <button
+ type="button"
+ onClick={() => props.onDelete(node)}
+ class="min-h-10 sm:min-h-9 min-w-10 sm:min-w-9 p-2.5 text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300"
+ title="Delete node"
+ >
+ <svg
+ width="16"
+ height="16"
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ stroke-width="2"
>
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- stroke-width="2"
- >
- <polyline points="3 6 5 6 21 6"></polyline>
- <path d="M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"></path>
- </svg>
- </button>
- </div>
- </TableCell>
- </TableRow>
- );
- }}
- </For>
- </TableBody>
- </Table>
- </div>
+ <polyline points="3 6 5 6 21 6"></polyline>
+ <path d="M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"></path>
+ </svg>
+ </button>
+ </div>
+ </TableCell>
+ </TableRow>
+ );
+ }}
+ </For>
+ </TableBody>
+ </Table>
</Card>
);
};
diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
index a281441beb..19b8a3f3a3 100644
--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
@@ -74,6 +74,7 @@ import groupedTableRowPresentationSource from '@/components/shared/groupedTableR
import workloadsFilterSource from '@/components/Workloads/WorkloadsFilter.tsx?raw';
import infrastructurePageSurfaceSource from '@/features/infrastructure/InfrastructurePageSurface.tsx?raw';
import infrastructureSourceManagerSource from '@/components/Settings/InfrastructureSourceManager.tsx?raw';
+import configuredNodeTablesSource from '@/components/Settings/ConfiguredNodeTables.tsx?raw';
import infrastructureSummaryTableSource from '@/components/shared/InfrastructureSummaryTable.tsx?raw';
import infrastructureSummaryTableRowSource from '@/components/shared/InfrastructureSummaryTableRow.tsx?raw';
import infrastructureSelectorModelSource from '@/components/shared/infrastructureSelectorModel.ts?raw';
@@ -526,10 +527,12 @@ describe('shared primitive guardrails', () => {
storagePoolsTableSource,
diskListSource,
infrastructureSourceManagerSource,
+ configuredNodeTablesSource,
]) {
expect(source).toContain('<Table');
expect(source).not.toContain('<div class="overflow-x-auto">');
expect(source).not.toContain('<div class="overflow-x-auto bg-surface">');
+ expect(source).not.toContain('<div class="overflow-auto max-h-[600px]">');
}
for (const source of [
@@ -560,6 +563,7 @@ describe('shared primitive guardrails', () => {
expect(diskListSource).not.toContain("from '@/components/shared/Card'");
expect(diskListSource).not.toContain('PHYSICAL_DISK_TABLE_SCROLL_CLASS');
expect(recoveryProtectedInventorySectionSource).toContain('wrapperClass="bg-surface"');
+ expect(configuredNodeTablesSource).toContain('wrapperClass="max-h-[600px] overflow-y-auto"');
expect(storageContentCardSource).toContain('<StoragePoolsTable');
});
diff --git a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
index 5ba0702158..06f5ec9102 100644
--- a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
+++ b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts
@@ -4045,6 +4045,10 @@ describe('frontend resource type boundaries', () => {
expect(configuredNodeTablesSource).toContain('getConfiguredNodeCapabilityBadges');
expect(configuredNodeTablesSource).toContain('resolveConfiguredPveNodeStatusIndicator');
expect(configuredNodeTablesSource).toContain('resolveConfiguredInstanceStatusIndicator');
+ expect(configuredNodeTablesSource).toMatch(/<Table(?:\s|>)/);
+ expect(configuredNodeTablesSource).toContain('wrapperClass="max-h-[600px] overflow-y-auto"');
+ expect(configuredNodeTablesSource).not.toContain('<div class="overflow-x-auto">');
+ expect(configuredNodeTablesSource).not.toContain('<div class="overflow-auto max-h-[600px]">');
expect(configuredNodeTablesSource).not.toContain("'monitorVMs' in node");
expect(configuredNodeTablesSource).not.toContain("'monitorDatastores' in node");
expect(configuredNodeTablesSource).not.toContain(