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.

Unify resource drawer summary shell

rcourtmancc64fee2bde5
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index 86c4834da9..6142c05453 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -255,9 +255,12 @@ policy summaries before the user asks for relationship pattern detail.
Change-related summary badges now belong to the `Change history` section
instead of the `Runtime` card, so current-state facts and timeline context do
not compete for the same ownership on first read.
+The overview now begins with one primary `Summary` shell instead of separate
+peer `Runtime` and `Identity` cards, so current state and canonical identity
+read as one first-screen answer rather than two adjacent mini-surfaces.
The drawer header now stays focused on canonical identity and source/type
badges only, while workload/service drill-down links and Kubernetes platform
-signals live with the runtime card, so the top strip does not compete with
+signals live with the summary shell, so the top strip does not compete with
the resource name, status, or primary identity line.
Discovery support now also lives inside overview-only `Discovery context`
instead of a peer drawer tab, so supplemental discovery detail stays available
@@ -275,15 +278,15 @@ Host and node system or hardware cards now also live behind a collapsed
`Host details` support block instead of rendering before the primary overview
cards, so runtime status, identity, and next investigation steps stay first
while deeper machine detail remains available on demand.
-Within the runtime card, current-state facts now stay in the primary summary
+Within that summary shell, current-state facts now stay in the primary summary
while platform IDs, quick links, and platform-signal badges live in a smaller
`Operational context` block, so first read remains status-first instead of
mixing state and supporting action surfaces together.
-The identity card now follows the same rule: canonical identity rows stay in
-the primary summary, while aliases, IPs, and tags live in a smaller
+That same summary shell also keeps canonical identity rows primary, while
+aliases, IPs, and tags live in a smaller
`Supporting context` block so the drawer answers "what is this resource" before
showing every attached label.
-When that card has no owned identity rows or supporting labels yet, the sparse
+When the identity side has no owned rows or supporting labels yet, the sparse
fallback now stays terse (`No identity metadata yet.`) so empty state chrome
does not read heavier than the data it is standing in for.
Type-specific Docker, PBS, and PMG operational panels now also live inside a
diff --git a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
index c3f4741e6d..4fdc87b2aa 100644
--- a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
+++ b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
@@ -918,221 +918,233 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
{/* Overview Tab */}
<div class={activeTab() === 'overview' ? '' : 'hidden'} style={{ 'overflow-anchor': 'none' }}>
- <div class="grid gap-3 md:grid-cols-2 lg:grid-cols-3">
- <div class="rounded border border-border bg-surface p-3">
- <div class="text-[11px] font-medium uppercase tracking-wide text-base-content mb-2">
- Runtime
+ <div class="space-y-3">
+ <div
+ data-testid="resource-summary-section"
+ class="rounded border border-border bg-surface p-3"
+ >
+ <div class="text-[11px] font-medium uppercase tracking-wide text-base-content">
+ Summary
</div>
- <div class="space-y-1.5 text-[11px]">
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">State</span>
- <span class="font-medium text-base-content capitalize">
- {props.resource.status || 'unknown'}
- </span>
- </div>
- <Show when={props.resource.uptime}>
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">Uptime</span>
- <span class="font-medium text-base-content">
- {formatUptime(props.resource.uptime ?? 0)}
- </span>
- </div>
- </Show>
- <Show when={props.resource.lastSeen}>
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">Last Seen</span>
- <span class="font-medium text-base-content" title={lastSeenAbsolute()}>
- {lastSeen() || '—'}
- </span>
- </div>
- </Show>
- <Show when={sourceSummary()}>
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">Sources</span>
- <span
- class={`font-medium ${sourceSummary()!.className}`}
- title={sourceSummary()!.title}
- >
- {sourceSummary()!.label}
- </span>
- </div>
- </Show>
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">Mode</span>
- <span class="font-medium text-base-content">
- {formatSourceType(props.resource.sourceType)}
- </span>
- </div>
- <Show when={(props.resource.alerts?.length || 0) > 0}>
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">Alerts</span>
- <span class="font-medium text-amber-600 dark:text-amber-400">
- {formatInteger(props.resource.alerts?.length)}
- </span>
- </div>
- </Show>
- <Show when={props.resource.platformId && !hasRuntimeOperationalContext()}>
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">Platform ID</span>
- <span
- class="font-medium text-base-content truncate"
- title={props.resource.platformId}
- >
- {props.resource.platformId}
- </span>
- </div>
- </Show>
- <Show when={hasRuntimeOperationalContext()}>
- <div class="mt-2 rounded border border-border bg-surface-hover px-2 py-2">
- <div class="text-[10px] font-medium uppercase tracking-wide text-base-content">
- Operational context
- </div>
- <div class="mt-2 space-y-1.5">
- <Show when={props.resource.platformId}>
- <div class="flex items-center justify-between gap-2">
- <span class="text-muted">Platform ID</span>
- <span
- class="font-medium text-base-content truncate"
- title={props.resource.platformId}
- >
- {props.resource.platformId}
- </span>
- </div>
- </Show>
- <Show when={kubernetesCapabilityBadges().length > 0}>
- <div class="flex flex-col gap-1">
- <span class="text-muted">Platform signals</span>
- <div class="flex flex-wrap gap-1">
- <For each={kubernetesCapabilityBadges()}>
- {(badge) => (
- <span class={badge.classes} title={badge.title}>
- {badge.label}
- </span>
- )}
- </For>
- </div>
- </div>
- </Show>
- <Show when={relatedLinks().length > 0}>
- <div class="flex flex-col gap-1">
- <span class="text-muted">Quick links</span>
- <div class="flex flex-wrap gap-2">
- <For each={relatedLinks()}>
- {(link) => (
- <a
- href={link.href}
- aria-label={link.ariaLabel}
- class="inline-flex items-center rounded border border-blue-200 bg-blue-50 px-2.5 py-1 text-[11px] font-medium text-blue-700 transition-colors hover:bg-blue-100 dark:border-blue-700 dark:bg-blue-900 dark:text-blue-200 dark:hover:bg-blue-900"
- >
- {link.compactLabel}
- </a>
- )}
- </For>
- </div>
- </div>
- </Show>
- </div>
+ <div class="mt-3 grid gap-4 md:grid-cols-[minmax(0,1.1fr)_minmax(0,0.9fr)]">
+ <div data-testid="resource-current-state-section">
+ <div class="mb-2 text-[10px] font-medium uppercase tracking-wide text-base-content">
+ Current state
</div>
- </Show>
- </div>
- </div>
-
- <div class="rounded border border-border bg-surface p-3">
- <div class="text-[11px] font-medium uppercase tracking-wide text-base-content mb-2">
- Identity
- </div>
- <div class="space-y-1.5 text-[11px]">
- <For each={primaryIdentityRows()}>
- {(row) => (
+ <div class="space-y-1.5 text-[11px]">
<div class="flex items-center justify-between gap-2">
- <span class="text-muted">{row.label}</span>
- <span class="font-medium text-base-content truncate" title={row.value}>
- {row.value}
+ <span class="text-muted">State</span>
+ <span class="font-medium text-base-content capitalize">
+ {props.resource.status || 'unknown'}
</span>
</div>
- )}
- </For>
- <Show when={hasIdentitySupportContext()}>
- <div class="mt-2 rounded border border-border bg-surface-hover px-2 py-2">
- <div class="text-[10px] font-medium uppercase tracking-wide text-base-content">
- Supporting context
+ <Show when={props.resource.uptime}>
+ <div class="flex items-center justify-between gap-2">
+ <span class="text-muted">Uptime</span>
+ <span class="font-medium text-base-content">
+ {formatUptime(props.resource.uptime ?? 0)}
+ </span>
+ </div>
+ </Show>
+ <Show when={props.resource.lastSeen}>
+ <div class="flex items-center justify-between gap-2">
+ <span class="text-muted">Last Seen</span>
+ <span class="font-medium text-base-content" title={lastSeenAbsolute()}>
+ {lastSeen() || '—'}
+ </span>
+ </div>
+ </Show>
+ <Show when={sourceSummary()}>
+ <div class="flex items-center justify-between gap-2">
+ <span class="text-muted">Sources</span>
+ <span
+ class={`font-medium ${sourceSummary()!.className}`}
+ title={sourceSummary()!.title}
+ >
+ {sourceSummary()!.label}
+ </span>
+ </div>
+ </Show>
+ <div class="flex items-center justify-between gap-2">
+ <span class="text-muted">Mode</span>
+ <span class="font-medium text-base-content">
+ {formatSourceType(props.resource.sourceType)}
+ </span>
</div>
- <Show when={identitySupportSummary()}>
- <div class="mt-1 text-[10px] text-muted">{identitySupportSummary()}</div>
+ <Show when={(props.resource.alerts?.length || 0) > 0}>
+ <div class="flex items-center justify-between gap-2">
+ <span class="text-muted">Alerts</span>
+ <span class="font-medium text-amber-600 dark:text-amber-400">
+ {formatInteger(props.resource.alerts?.length)}
+ </span>
+ </div>
</Show>
- <div class="mt-2 space-y-1.5">
- <Show when={props.resource.identity?.ips && props.resource.identity.ips.length > 0}>
- <div class="flex flex-col gap-1">
- <span class="text-muted">IP Addresses</span>
- <div class="flex flex-wrap gap-1">
- <For each={props.resource.identity?.ips ?? []}>
- {(ip) => (
- <span
- class="inline-flex items-center rounded bg-blue-100 px-1.5 py-0.5 text-[10px] text-blue-700 dark:bg-blue-900 dark:text-blue-200"
- title={ip}
- >
- {ip}
- </span>
- )}
- </For>
- </div>
+ <Show when={props.resource.platformId && !hasRuntimeOperationalContext()}>
+ <div class="flex items-center justify-between gap-2">
+ <span class="text-muted">Platform ID</span>
+ <span
+ class="font-medium text-base-content truncate"
+ title={props.resource.platformId}
+ >
+ {props.resource.platformId}
+ </span>
+ </div>
+ </Show>
+ <Show when={hasRuntimeOperationalContext()}>
+ <div class="mt-2 rounded border border-border bg-surface-hover px-2 py-2">
+ <div class="text-[10px] font-medium uppercase tracking-wide text-base-content">
+ Operational context
</div>
- </Show>
- <Show when={props.resource.tags && props.resource.tags.length > 0}>
+ <div class="mt-2 space-y-1.5">
+ <Show when={props.resource.platformId}>
+ <div class="flex items-center justify-between gap-2">
+ <span class="text-muted">Platform ID</span>
+ <span
+ class="font-medium text-base-content truncate"
+ title={props.resource.platformId}
+ >
+ {props.resource.platformId}
+ </span>
+ </div>
+ </Show>
+ <Show when={kubernetesCapabilityBadges().length > 0}>
+ <div class="flex flex-col gap-1">
+ <span class="text-muted">Platform signals</span>
+ <div class="flex flex-wrap gap-1">
+ <For each={kubernetesCapabilityBadges()}>
+ {(badge) => (
+ <span class={badge.classes} title={badge.title}>
+ {badge.label}
+ </span>
+ )}
+ </For>
+ </div>
+ </div>
+ </Show>
+ <Show when={relatedLinks().length > 0}>
+ <div class="flex flex-col gap-1">
+ <span class="text-muted">Quick links</span>
+ <div class="flex flex-wrap gap-2">
+ <For each={relatedLinks()}>
+ {(link) => (
+ <a
+ href={link.href}
+ aria-label={link.ariaLabel}
+ class="inline-flex items-center rounded border border-blue-200 bg-blue-50 px-2.5 py-1 text-[11px] font-medium text-blue-700 transition-colors hover:bg-blue-100 dark:border-blue-700 dark:bg-blue-900 dark:text-blue-200 dark:hover:bg-blue-900"
+ >
+ {link.compactLabel}
+ </a>
+ )}
+ </For>
+ </div>
+ </div>
+ </Show>
+ </div>
+ </div>
+ </Show>
+ </div>
+ </div>
+
+ <div data-testid="resource-identity-section">
+ <div class="mb-2 text-[10px] font-medium uppercase tracking-wide text-base-content">
+ Identity
+ </div>
+ <div class="space-y-1.5 text-[11px]">
+ <For each={primaryIdentityRows()}>
+ {(row) => (
<div class="flex items-center justify-between gap-2">
- <span class="text-muted">Tags</span>
- <TagBadges tags={props.resource.tags} maxVisible={6} />
+ <span class="text-muted">{row.label}</span>
+ <span class="font-medium text-base-content truncate" title={row.value}>
+ {row.value}
+ </span>
</div>
- </Show>
- <Show when={identityAliasValues().length > 0}>
- <Show
- when={hasAliasOverflow()}
- fallback={
+ )}
+ </For>
+ <Show when={hasIdentitySupportContext()}>
+ <div class="mt-2 rounded border border-border bg-surface-hover px-2 py-2">
+ <div class="text-[10px] font-medium uppercase tracking-wide text-base-content">
+ Supporting context
+ </div>
+ <Show when={identitySupportSummary()}>
+ <div class="mt-1 text-[10px] text-muted">{identitySupportSummary()}</div>
+ </Show>
+ <div class="mt-2 space-y-1.5">
+ <Show
+ when={props.resource.identity?.ips && props.resource.identity.ips.length > 0}
+ >
<div class="flex flex-col gap-1">
- <span class="text-muted">Aliases</span>
+ <span class="text-muted">IP Addresses</span>
<div class="flex flex-wrap gap-1">
- <For each={aliasPreviewValues()}>
- {(value) => (
+ <For each={props.resource.identity?.ips ?? []}>
+ {(ip) => (
<span
- class="inline-flex items-center rounded bg-surface-alt px-1.5 py-0.5 text-[10px]"
- title={value}
+ class="inline-flex items-center rounded bg-blue-100 px-1.5 py-0.5 text-[10px] text-blue-700 dark:bg-blue-900 dark:text-blue-200"
+ title={ip}
>
- {value}
+ {ip}
</span>
)}
</For>
</div>
</div>
- }
- >
- <details class="rounded border border-border bg-surface px-2 py-1.5">
- <summary class="flex cursor-pointer list-none items-center justify-between text-[10px] font-medium text-muted">
- <span>Aliases</span>
- <span class="text-muted">{identityAliasValues().length}</span>
- </summary>
- <div class="mt-2 flex flex-wrap gap-1 border-t border-border pt-2">
- <For each={identityAliasValues()}>
- {(value) => (
- <span
- class="inline-flex items-center rounded bg-surface-alt px-1.5 py-0.5 text-[10px]"
- title={value}
- >
- {value}
- </span>
- )}
- </For>
+ </Show>
+ <Show when={props.resource.tags && props.resource.tags.length > 0}>
+ <div class="flex items-center justify-between gap-2">
+ <span class="text-muted">Tags</span>
+ <TagBadges tags={props.resource.tags} maxVisible={6} />
</div>
- </details>
- </Show>
- </Show>
- </div>
- </div>
- </Show>
- <Show when={!identityCardHasRichData()}>
- <div class="rounded border border-dashed bg-surface-hover px-2 py-1.5 text-[10px] ">
- No identity metadata yet.
+ </Show>
+ <Show when={identityAliasValues().length > 0}>
+ <Show
+ when={hasAliasOverflow()}
+ fallback={
+ <div class="flex flex-col gap-1">
+ <span class="text-muted">Aliases</span>
+ <div class="flex flex-wrap gap-1">
+ <For each={aliasPreviewValues()}>
+ {(value) => (
+ <span
+ class="inline-flex items-center rounded bg-surface-alt px-1.5 py-0.5 text-[10px]"
+ title={value}
+ >
+ {value}
+ </span>
+ )}
+ </For>
+ </div>
+ </div>
+ }
+ >
+ <details class="rounded border border-border bg-surface px-2 py-1.5">
+ <summary class="flex cursor-pointer list-none items-center justify-between text-[10px] font-medium text-muted">
+ <span>Aliases</span>
+ <span class="text-muted">{identityAliasValues().length}</span>
+ </summary>
+ <div class="mt-2 flex flex-wrap gap-1 border-t border-border pt-2">
+ <For each={identityAliasValues()}>
+ {(value) => (
+ <span
+ class="inline-flex items-center rounded bg-surface-alt px-1.5 py-0.5 text-[10px]"
+ title={value}
+ >
+ {value}
+ </span>
+ )}
+ </For>
+ </div>
+ </details>
+ </Show>
+ </Show>
+ </div>
+ </div>
+ </Show>
+ <Show when={!identityCardHasRichData()}>
+ <div class="rounded border border-dashed bg-surface-hover px-2 py-1.5 text-[10px] ">
+ No identity metadata yet.
+ </div>
+ </Show>
</div>
- </Show>
+ </div>
</div>
</div>
diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
index 8d6664dd9e..b60eee0140 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
@@ -186,6 +186,9 @@ describe('ResourceDetailDrawer change history section', () => {
await screen.findByText('Changes loaded');
const changeHistorySection = screen.getByTestId('resource-change-history-section');
expect(screen.queryByRole('button', { name: 'Discovery' })).toBeNull();
+ expect(screen.getByText('Summary')).toBeInTheDocument();
+ expect(screen.getByText('Current state')).toBeInTheDocument();
+ expect(screen.queryByText('Runtime')).toBeNull();
expect(screen.getByText('Change history')).toBeInTheDocument();
expect(screen.queryByText('Host details')).toBeNull();
expect(screen.queryByText('Service details')).toBeNull();
diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.identity-runtime.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.identity-runtime.test.tsx
index 59c7ee3b6c..7ddcf9e426 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.identity-runtime.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.identity-runtime.test.tsx
@@ -106,7 +106,7 @@ const baseResource = (overrides: Partial<Resource>): Resource => ({
});
describe('ResourceDetailDrawer runtime and identity cards', () => {
- it('renders runtime source summary and mode details', () => {
+ it('renders a unified summary shell with current-state source and mode details', () => {
const resource = baseResource({
platformData: {
sources: ['agent', 'proxmox'],
@@ -119,13 +119,15 @@ describe('ResourceDetailDrawer runtime and identity cards', () => {
const { getByRole, getByText } = render(() => <ResourceDetailDrawer resource={resource} />);
- expect(getByText('Runtime')).toBeInTheDocument();
+ expect(getByText('Summary')).toBeInTheDocument();
+ expect(getByText('Current state')).toBeInTheDocument();
expect(getByText('Sources')).toBeInTheDocument();
expect(getByText('2/2 healthy')).toBeInTheDocument();
expect(getByText('Mode')).toBeInTheDocument();
expect(getByText('Hybrid')).toBeInTheDocument();
expect(getByText('Operational context')).toBeInTheDocument();
expect(getByText('Quick links')).toBeInTheDocument();
+ expect(() => getByText('Runtime')).toThrow();
expect(getByRole('link', { name: 'Open related workloads for host-1' })).toHaveTextContent(
'Workloads',
);