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.

Link resource graph references

rcourtmande7770282dfe
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 b3e266f454..f41faf65c6 100644
--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md
@@ -91,7 +91,10 @@ future summary changes must preserve the same bounded row budget instead of
forking separate table-only presentation logic. Row summaries now also prefer
canonical `facetCounts` on each resource when they are available, so the hot
path can stay within the same budget while still reading totals from the
-shared resource contract.
+shared resource contract. The drawer history surface reuses the same governed
+resource route helpers for relationship and related-resource links, so cross-
+resource navigation stays within the existing infrastructure surface rather
+than branching into custom detail-only routing.
Governance metadata such as sensitivity and routing scope may be visible in
the table, but it must remain on the same bounded row-windowing and mounted-row
budget proved by `UnifiedResourceTable.performance.contract.test.tsx` rather
diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.md
index 56f685d2d7..f0c8e2b8c4 100644
--- a/docs/release-control/v6/internal/subsystems/unified-resources.md
+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md
@@ -189,7 +189,10 @@ fetches those facets through one backend bundle endpoint, and that shared
facet bundle preserves backend counts for capabilities, relationships, and the
timeline slice so the overview card and history summary can report the total
facet history instead of collapsing to the currently loaded page when the
-timeline endpoint is paginated.
+timeline endpoint is paginated. Relationship and timeline references in that
+drawer now route through the canonical infrastructure resource filter, so the
+resource graph remains navigable from the history surface instead of being
+purely descriptive text.
The Connected infrastructure settings surface now also depends on a backend
owned `connectedInfrastructure` projection derived from unified resources plus
reporting-ignore state. That projection is now also the only v6 client
diff --git a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
index baa61d730f..3735ea247c 100644
--- a/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
+++ b/frontend-modern/src/components/Infrastructure/ResourceDetailDrawer.tsx
@@ -39,6 +39,7 @@ import { SwarmServicesDrawer } from '@/components/Docker/SwarmServicesDrawer';
import { WebInterfaceUrlField } from '@/components/shared/WebInterfaceUrlField';
import { getServiceHealthPresentation } from '@/utils/serviceHealthPresentation';
import { ResourceAPI } from '@/api/resources';
+import { buildInfrastructurePath } from '@/routing/resourceLinks';
import {
getResourcePolicyBadges,
getResourcePolicyRedactionLabels,
@@ -66,6 +67,11 @@ import {
formatSourceType,
} from './resourceDetailMappers';
+const buildInfrastructureResourceHref = (resourceId: string): string | null => {
+ const trimmed = resourceId.trim();
+ return trimmed ? buildInfrastructurePath({ resource: trimmed }) : null;
+};
+
const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
type DrawerTab =
| 'overview'
@@ -1471,7 +1477,35 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
<div class="rounded border border-border bg-surface-hover px-2 py-1.5 text-[10px]">
<div class="flex items-center justify-between gap-2">
<span class="font-medium text-base-content">
- {relationship.sourceId} → {relationship.targetId}
+ <Show
+ when={buildInfrastructureResourceHref(relationship.sourceId)}
+ fallback={<span>{relationship.sourceId}</span>}
+ >
+ {(href) => (
+ <a
+ class="rounded px-0.5 text-blue-700 hover:underline dark:text-blue-300"
+ href={href()}
+ aria-label={`Open source resource ${relationship.sourceId} in Infrastructure`}
+ >
+ {relationship.sourceId}
+ </a>
+ )}
+ </Show>
+ {' → '}
+ <Show
+ when={buildInfrastructureResourceHref(relationship.targetId)}
+ fallback={<span>{relationship.targetId}</span>}
+ >
+ {(href) => (
+ <a
+ class="rounded px-0.5 text-blue-700 hover:underline dark:text-blue-300"
+ href={href()}
+ aria-label={`Open target resource ${relationship.targetId} in Infrastructure`}
+ >
+ {relationship.targetId}
+ </a>
+ )}
+ </Show>
</span>
<span class="text-muted">{humanizeFacetToken(relationship.type)}</span>
</div>
@@ -1574,8 +1608,26 @@ const DrawerContent: Component<ResourceDetailDrawerProps> = (props) => {
</div>
</Show>
<Show when={change.relatedResources && change.relatedResources.length > 0}>
- <div class="mt-1 text-muted">
- Related: {change.relatedResources?.join(', ')}
+ <div class="mt-1 flex flex-wrap items-center gap-1 text-muted">
+ <span>Related:</span>
+ <For each={change.relatedResources ?? []}>
+ {(relatedResource) => {
+ const href = buildInfrastructureResourceHref(relatedResource);
+ return href ? (
+ <a
+ class="inline-flex rounded bg-surface px-1.5 py-0.5 text-[10px] text-blue-700 hover:underline dark:text-blue-300"
+ href={href}
+ aria-label={`Open related resource ${relatedResource} in Infrastructure`}
+ >
+ {relatedResource}
+ </a>
+ ) : (
+ <span class="inline-flex rounded bg-surface px-1.5 py-0.5 text-[10px] text-base-content">
+ {relatedResource}
+ </span>
+ );
+ }}
+ </For>
</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 991eb4471e..3bd4165e2c 100644
--- a/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
+++ b/frontend-modern/src/components/Infrastructure/__tests__/ResourceDetailDrawer.history.test.tsx
@@ -196,7 +196,15 @@ describe('ResourceDetailDrawer history tab', () => {
expect(panel.getAllByText('Relationships')).toHaveLength(2);
expect(panel.getByText('Timeline')).toBeInTheDocument();
expect(screen.getByText('Timeline 3')).toBeInTheDocument();
- expect(panel.getByText('node:pve-1 → vm:42')).toBeInTheDocument();
+ expect(
+ panel.getByRole('link', { name: 'Open source resource node:pve-1 in Infrastructure' }),
+ ).toHaveAttribute('href', '/infrastructure?resource=node%3Apve-1');
+ expect(
+ panel.getByRole('link', { name: 'Open target resource vm:42 in Infrastructure' }),
+ ).toHaveAttribute('href', '/infrastructure?resource=vm%3A42');
+ expect(
+ panel.getByRole('link', { name: 'Open related resource node:pve-1 in Infrastructure' }),
+ ).toHaveAttribute('href', '/infrastructure?resource=node%3Apve-1');
expect(panel.getByText('Routine restart requested')).toBeInTheDocument();
});
});