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.

Separate runtime status from operational context

rcourtman0249a8c98680
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index 7b0a049f75..be32bd65ca 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -268,6 +268,10 @@ 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
+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 same facet bundle now also returns grouped recent-change counts by
canonical change kind, so the detail drawer can surface the distribution of
state transitions, restarts, config updates, and anomalies without
diff --git a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
index d0405dbc9d..1b2396305e 100644
--- a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
+++ b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
@@ -605,6 +605,9 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
return true;
});
});
+ const hasRuntimeOperationalContext = createMemo(
+ () => kubernetesCapabilityBadges().length > 0 || relatedLinks().length > 0,
+ );
const sourceSections = createMemo(() => {
const data = platformData();
if (!data) return [];
@@ -855,7 +858,7 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
</span>
</div>
</Show>
- <Show when={props.resource.platformId}>
+ <Show when={props.resource.platformId && !hasRuntimeOperationalContext()}>
<div class="flex items-center justify-between gap-2">
<span class="text-muted">Platform ID</span>
<span
@@ -866,35 +869,55 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
</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>
+ <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>
- </Show>
- <Show when={relatedLinks().length > 0}>
- <div class="flex flex-col gap-1 pt-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"
+ <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}
>
- {link.compactLabel}
- </a>
- )}
- </For>
+ {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>
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 593e524d79..272c7cbf9b 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
@@ -193,6 +193,7 @@ describe('ResourceDetailDrawer change history section', () => {
screen.getByText('Supporting metadata only. The web interface path above stays primary.'),
).toBeInTheDocument();
expect(screen.getByRole('button', { name: 'Show metadata' })).toBeInTheDocument();
+ expect(screen.queryByText('Operational context')).toBeNull();
expect(within(changeHistorySection).getByText('Recent activity')).toBeInTheDocument();
expect(screen.queryByText('Events')).toBeNull();
expect(screen.getAllByText('Timeline 3')).toHaveLength(1);
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 6ad7917898..bac0c020b3 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
@@ -121,6 +121,7 @@ describe('ResourceDetailDrawer runtime and identity cards', () => {
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(getByRole('link', { name: 'Open related workloads for host-1' })).toHaveTextContent(
'Workloads',
@@ -210,12 +211,15 @@ describe('ResourceDetailDrawer runtime and identity cards', () => {
},
});
- const { getByText, getAllByText } = render(() => <ResourceDetailDrawer resource={resource} />);
+ const { getByText, getAllByText, queryByText } = render(() => (
+ <ResourceDetailDrawer resource={resource} />
+ ));
expect(getByText('Sources')).toBeInTheDocument();
expect(getAllByText('PMG').length).toBeGreaterThan(0);
expect(getByText('Mode')).toBeInTheDocument();
expect(getByText('API')).toBeInTheDocument();
+ expect(queryByText('Operational context')).toBeInTheDocument();
});
it('shows identity aliases and fallback message when identity metadata is sparse', () => {