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.

Resolve correlation labels in drawer context

rcourtman2802afb3b1bb
diff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
index 51ba777101..a71eafff11 100644
--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
@@ -128,6 +128,9 @@ The shared table now also passes the same canonical resource-label resolver
into the detail drawer so related-resource chips in the timeline/history path
can resolve through the canonical catalog without adding a separate
detail-only lookup branch to the hot-row path.
+The same detail drawer also uses that resolver for correlation dependency and
+dependent chips, so the investigation path does not fall back to raw IDs in
+the drawer while the AI page keeps its broader no-catalog fallback.
The shared infrastructure selector search path now also routes through that
same policy-aware display contract, so governed resources do not reappear via
raw-name search candidates while the selector stays on the same hot-path
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index e633c2a052..2692e7dcb9 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -403,6 +403,10 @@ The unified resource table now also supplies a canonical resource-label
resolver into the resource drawer, so related-resource timeline chips can use
the same governed display labels as the table without adding a new
detail-local lookup path.
+The resource drawer now also passes that same resolver into the shared
+correlation summary, so dependency and dependent chips stay on governed
+labels in the investigation path while the AI summary page keeps its broader
+raw-ID fallback.
The same timeline and facet-bundle reads now also accept governed `kind` and
`sourceType` filters, plus a governed `sourceAdapter` filter for adapter-level
provenance drill-down, so history can narrow by canonical change class and
diff --git a/frontend-modern/src/components/Infrastructure/ResourceCorrelationSummary.tsx b/frontend-modern/src/components/Infrastructure/ResourceCorrelationSummary.tsx
index 79ee42144b..579905baf3 100644
--- a/frontend-modern/src/components/Infrastructure/ResourceCorrelationSummary.tsx
+++ b/frontend-modern/src/components/Infrastructure/ResourceCorrelationSummary.tsx
@@ -18,6 +18,7 @@ interface ResourceCorrelationSummaryProps {
title?: string;
summaryText?: string;
buildResourceHref?: (resourceId: string) => string | null | undefined;
+ resolveResourceLabel?: (resourceId: string) => string | null | undefined;
showLastSeen?: boolean;
class?: string;
maxCorrelations?: number;
@@ -29,6 +30,7 @@ export const ResourceCorrelationSummary: Component<ResourceCorrelationSummaryPro
const dependencies = () => props.dependencies ?? [];
const dependents = () => props.dependents ?? [];
const buildResourceHref = props.buildResourceHref ?? buildInfrastructureResourceHref;
+ const resolveResourceLabel = props.resolveResourceLabel;
const maxCorrelations = () => props.maxCorrelations ?? 3;
const hasContent = () =>
dependencies().length > 0 || dependents().length > 0 || correlations().length > 0;
@@ -60,18 +62,19 @@ export const ResourceCorrelationSummary: Component<ResourceCorrelationSummaryPro
<div class="mt-1 flex flex-wrap gap-1">
<For each={dependencies().slice(0, maxCorrelations())}>
{(dependency) => {
+ const label = resolveResourceLabel?.(dependency)?.trim() || dependency;
const href = buildResourceHref(dependency);
return href ? (
<a
class="inline-flex items-center rounded bg-surface-alt px-1.5 py-0.5 text-[10px] text-blue-700 hover:underline dark:text-blue-300"
href={href}
- aria-label={`Open dependency resource ${dependency} in Infrastructure`}
+ aria-label={`Open dependency resource ${label} in Infrastructure`}
>
- {dependency}
+ {label}
</a>
) : (
<span class="inline-flex items-center rounded bg-surface-alt px-1.5 py-0.5 text-[10px]">
- {dependency}
+ {label}
</span>
);
}}
@@ -86,18 +89,19 @@ export const ResourceCorrelationSummary: Component<ResourceCorrelationSummaryPro
<div class="mt-1 flex flex-wrap gap-1">
<For each={dependents().slice(0, maxCorrelations())}>
{(dependent) => {
+ const label = resolveResourceLabel?.(dependent)?.trim() || dependent;
const href = buildResourceHref(dependent);
return href ? (
<a
class="inline-flex items-center rounded bg-surface-alt px-1.5 py-0.5 text-[10px] text-blue-700 hover:underline dark:text-blue-300"
href={href}
- aria-label={`Open dependent resource ${dependent} in Infrastructure`}
+ aria-label={`Open dependent resource ${label} in Infrastructure`}
>
- {dependent}
+ {label}
</a>
) : (
<span class="inline-flex items-center rounded bg-surface-alt px-1.5 py-0.5 text-[10px]">
- {dependent}
+ {label}
</span>
);
}}
diff --git a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
index a47397839a..d722a2f904 100644
--- a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
+++ b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
@@ -824,6 +824,7 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
dependencies={resourceDependencies()}
dependents={resourceDependents()}
correlations={resourceCorrelations()}
+ resolveResourceLabel={resolveResourceLabel}
showLastSeen
/>
</div>
diff --git a/frontend-modern/src/components/Infrastructure/__tests__/ResourceCorrelationSummary.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/ResourceCorrelationSummary.test.tsx
index 1cb0d45f75..d1bd5722fd 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceCorrelationSummary.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceCorrelationSummary.test.tsx
@@ -46,6 +46,13 @@ describe('ResourceCorrelationSummary', () => {
title="Correlation context"
dependencies={['storage-1']}
dependents={['vm-child']}
+ resolveResourceLabel={(resourceId) =>
+ resourceId === 'storage-1'
+ ? 'Storage 1 alias'
+ : resourceId === 'vm-child'
+ ? 'VM Child'
+ : resourceId
+ }
correlations={[
{
source_id: 'storage-1',
@@ -71,10 +78,14 @@ describe('ResourceCorrelationSummary', () => {
expect(screen.getByText('Depends on')).toBeInTheDocument();
expect(screen.getByText('Used by')).toBeInTheDocument();
expect(screen.getByText('Correlations')).toBeInTheDocument();
- expect(screen.getByRole('link', { name: 'Open dependency resource storage-1 in Infrastructure' }))
- .toHaveAttribute('href', '/infrastructure?resource=storage-1');
- expect(screen.getByRole('link', { name: 'Open dependent resource vm-child in Infrastructure' }))
- .toHaveAttribute('href', '/infrastructure?resource=vm-child');
+ expect(
+ screen.getByRole('link', { name: 'Open dependency resource Storage 1 alias in Infrastructure' }),
+ ).toHaveAttribute('href', '/infrastructure?resource=storage-1');
+ expect(screen.getByText('Storage 1 alias')).toBeInTheDocument();
+ expect(
+ screen.getByRole('link', { name: 'Open dependent resource VM Child in Infrastructure' }),
+ ).toHaveAttribute('href', '/infrastructure?resource=vm-child');
+ expect(screen.getByText('VM Child')).toBeInTheDocument();
expect(screen.getByText(/last seen/i)).toBeInTheDocument();
});
});
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 7eebd2e11b..fba5fe80de 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
@@ -18,6 +18,24 @@ const aiIntelligenceMock = vi.hoisted(() => ({
factors: [],
prediction: 'Stable',
},
+ dependencies: ['storage-1'],
+ dependents: ['vm-child'],
+ correlations: [
+ {
+ source_id: 'storage-1',
+ source_name: 'Storage 1',
+ source_type: 'storage',
+ target_id: 'resource-1',
+ target_name: 'Host 1',
+ target_type: 'vm',
+ event_pattern: 'disk_full -> restart',
+ occurrences: 2,
+ avg_delay: 125000000000,
+ confidence: 0.875,
+ last_seen: '2026-03-01T00:15:00Z',
+ description: 'Disk pressure often precedes restarts',
+ },
+ ],
recent_changes: [],
note_count: 3,
}),
@@ -154,7 +172,13 @@ describe('ResourceDetailDrawer history tab', () => {
<ResourceDetailDrawer
resource={resource}
resolveResourceLabel={(resourceId) =>
- resourceId === 'node:pve-1' ? 'PVE Node 1' : resourceId
+ resourceId === 'node:pve-1'
+ ? 'PVE Node 1'
+ : resourceId === 'storage-1'
+ ? 'Storage 1 alias'
+ : resourceId === 'vm-child'
+ ? 'VM Child'
+ : resourceId
}
/>
));
@@ -167,6 +191,8 @@ describe('ResourceDetailDrawer history tab', () => {
expect(screen.getAllByText('Pulse diff 2')).toHaveLength(2);
expect(screen.getAllByText('Docker adapter 2')).toHaveLength(2);
expect(screen.getAllByText('Proxmox adapter 1')).toHaveLength(2);
+ expect(screen.getByText('Storage 1 alias')).toBeInTheDocument();
+ expect(screen.getByText('VM Child')).toBeInTheDocument();
expect(screen.queryByText('Capabilities 1')).toBeNull();
expect(screen.queryByText('Relationships 1')).toBeNull();
});