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.

Govern resource identity owner in unified resources

rcourtmanf97732c56fb9
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index d4ef34a729..d2a2afbd11 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -68,6 +68,7 @@ cross-source deduplication.
46. `frontend-modern/src/components/Infrastructure/InfrastructureSummary.tsx`
47. `frontend-modern/src/components/Infrastructure/useInfrastructureSummaryState.ts`
48. `frontend-modern/src/components/Infrastructure/infrastructureSummaryModel.ts`
+49. `frontend-modern/src/utils/resourceIdentity.ts`
## Shared Boundaries
@@ -555,6 +556,10 @@ resource label no longer need to re-encode the governed summary boundary by
hand. Settings quick-picks, infrastructure selectors, and the connected-
infrastructure / monitored-system projections now all stay on that same
preferred-label helper instead of carrying a separate raw-name fallback fork.
+That same helper also owns platform-id redundancy suppression for
+infrastructure drawers, so surfaces only render platform IDs when they add
+identity context beyond the canonical display name or hostname instead of
+repeating the same identifier chrome in both runtime and identity sections.
The shared workloads-link helper now also uses that preferred-label helper
for Kubernetes-cluster navigation fallbacks, so drawer/table navigation
context stays inside the same governed resource-label boundary instead of
diff --git a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx
index dba79002c0..5c8de5e4a0 100644
--- a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx
+++ b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawerOverviewTab.tsx
@@ -152,56 +152,47 @@ export const ResourceDetailDrawerOverviewTab: Component<ResourceDetailDrawerOver
</div>
</Show>
<Show when={drawer.hasRuntimeOperationalContext()}>
- <div class="mt-2 rounded border border-dashed border-border bg-surface-hover p-3">
- <div class="space-y-2.5">
- <Show when={drawer.hasRuntimeOperationalContext()}>
- <div class="space-y-1.5">
- <Show when={showPlatformId}>
- <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={resource.platformId}
- >
- {resource.platformId}
+ <div class="mt-2 space-y-1.5">
+ <Show when={showPlatformId}>
+ <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={resource.platformId}>
+ {resource.platformId}
+ </span>
+ </div>
+ </Show>
+ <Show when={drawer.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={drawer.kubernetesCapabilityBadges()}>
+ {(badge) => (
+ <span class={badge.classes} title={badge.title}>
+ {badge.label}
</span>
- </div>
- </Show>
- <Show when={drawer.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={drawer.kubernetesCapabilityBadges()}>
- {(badge) => (
- <span class={badge.classes} title={badge.title}>
- {badge.label}
- </span>
- )}
- </For>
- </div>
- </div>
- </Show>
- <Show when={drawer.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={drawer.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>
+ )}
+ </For>
</div>
- </Show>
- </div>
+ </div>
+ </Show>
+ <Show when={drawer.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={drawer.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>
</Show>
</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 683ed754d5..cf0e05d208 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
@@ -322,6 +322,7 @@ describe('ResourceDetailDrawer change history section', () => {
expect(screen.queryByText('Details')).toBeNull();
expect(screen.queryByRole('button', { name: 'Show details' })).toBeNull();
expect(screen.queryByText('Platform ID')).toBeNull();
+ expect(currentStateSection.querySelector('.border-dashed')).toBeNull();
expect(within(identitySection).getByText('Tags')).toBeInTheDocument();
expect(within(currentStateSection).queryByText('Tags')).toBeNull();
expect(
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 7fd27ff2a2..4c97ee947c 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
@@ -117,7 +117,7 @@ describe('ResourceDetailDrawer runtime and identity cards', () => {
},
});
- const { getByRole, getByText, queryByRole } = render(() => (
+ const { getByRole, getByTestId, getByText, queryByRole } = render(() => (
<ResourceDetailDrawer resource={resource} />
));
@@ -129,6 +129,7 @@ describe('ResourceDetailDrawer runtime and identity cards', () => {
expect(getByText('Hybrid')).toBeInTheDocument();
expect(() => getByText('Platform ID')).toThrow();
expect(getByText('Quick links')).toBeInTheDocument();
+ expect(getByTestId('resource-current-state-section').querySelector('.border-dashed')).toBeNull();
expect(queryByRole('button', { name: 'Show details' })).toBeNull();
expect(() => getByText('Runtime')).toThrow();
expect(getByRole('link', { name: 'Open related workloads for host-1' })).toHaveTextContent(