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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Centralize state adapter cluster labels
rcourtman393726eea616
diff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.mdindex 5ef7fff2f7..a5feb58521 100644--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md@@ -144,6 +144,10 @@ share the canonical cluster-name helpers in the shared agent-resource layer,so route labels, pod grouping, and cluster-name fetch keys keep using thesame source of truth instead of rebuilding the `clusterName`/`context`/`clusterId` prefix locally.+The shared node adapter also uses that same cluster-name helper for the+infrastructure summary surface, so Proxmox node projections stay aligned with+the same canonical cluster label instead of carrying a raw adapter-local+cluster string.The drawer's Kubernetes namespace/deployment tabs use the canonicalcluster-name helper for fetch keys, so the visible navigation label staysseparate from the backend cluster lookup contract.diff --git a/docs/release-control/v6/internal/subsystems/unified-resources.md b/docs/release-control/v6/internal/subsystems/unified-resources.mdindex d005300247..5981ab26cb 100644--- a/docs/release-control/v6/internal/subsystems/unified-resources.md+++ b/docs/release-control/v6/internal/subsystems/unified-resources.md@@ -176,6 +176,10 @@ The same shared agent-resource module now also owns the canonical cluster-namehelpers, so Kubernetes context prefixes, Proxmox cluster labels, andcluster-name fetch keys stay aligned instead of each surface rebuilding itsown pod, namespace, and VM routing fallbacks.+The shared node-state adapter also routes Proxmox cluster labels through that+same helper, so infrastructure summary projections keep the same canonical+cluster name as the rest of the unified resource model instead of rewriting+the label locally.The canonical unified-resource change and relationship presenters now alsoshare the same elapsed-time and "ago" wording utilities, so `observed`,`last seen`, and `ago` fragments stay consistent without each formatterdiff --git a/frontend-modern/src/utils/__tests__/resourceStateAdapters.test.ts b/frontend-modern/src/utils/__tests__/resourceStateAdapters.test.tsindex e683070e83..57fd36d4fb 100644--- a/frontend-modern/src/utils/__tests__/resourceStateAdapters.test.ts+++ b/frontend-modern/src/utils/__tests__/resourceStateAdapters.test.ts@@ -88,6 +88,20 @@ describe('resourceStateAdapters nodeFromResource', () => {expect(node?.displayName).toBe('Tower');expect(node?.host).toBe('tower.local');expect(node?.instance).toBe('pve-canonical');+ expect(node?.clusterName).toBeUndefined();+ });++ it('projects the canonical cluster name through the shared helper', () => {+ const node = nodeFromResource(+ createNodeResource({+ proxmox: {+ nodeName: 'pve-node-1',+ clusterName: 'cluster-a',+ },+ }),+ );++ expect(node?.clusterName).toBe('cluster-a');});it('maps PBS display and host identity through shared resource helpers', () => {diff --git a/frontend-modern/src/utils/resourceStateAdapters.ts b/frontend-modern/src/utils/resourceStateAdapters.tsindex 0eaaac1974..25b9c56daf 100644--- a/frontend-modern/src/utils/resourceStateAdapters.ts+++ b/frontend-modern/src/utils/resourceStateAdapters.ts@@ -23,6 +23,7 @@ import type {import type { Resource } from '@/types/resource';import { getActionableAgentIdFromResource } from '@/utils/agentResources';import {+ getPreferredResourceClusterName,getPreferredResourceDisplayName,getPreferredResourceHostname,} from '@/utils/resourceIdentity';@@ -232,7 +233,7 @@ export const nodeFromResource = (resource: Resource): Node | null => {lastSeen: toISOTime(undefined, resource.lastSeen),connectionHealth: asString(proxmox?.connectionHealth) || resource.status || 'unknown',isClusterMember: asBoolean(proxmox?.isClusterMember),- clusterName: asString(proxmox?.clusterName),+ clusterName: getPreferredResourceClusterName(resource),linkedAgentId,};};