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 alerts resource labels
rcourtman37a520375f51
diff --git a/docs/release-control/v6/internal/subsystems/alerts.md b/docs/release-control/v6/internal/subsystems/alerts.mdindex 292b3106ee..c8bca7ba02 100644--- a/docs/release-control/v6/internal/subsystems/alerts.md+++ b/docs/release-control/v6/internal/subsystems/alerts.md@@ -103,6 +103,10 @@ presentation now also route through`frontend-modern/src/utils/alertIncidentPresentation.ts` instead of remainingduplicated inline across the alerts page and overview timeline surfaces.+Alert resource tables now route resource labels and row action labels through+the shared policy-aware resource identity helper so governed resources do not+fall back to raw names inside the alerts surface.+Alert incident timeline event cards now route through`frontend-modern/src/components/Alerts/IncidentTimelineEventCard.tsx`,while their meta-row, heading, detail, command, and output typography stilldiff --git a/frontend-modern/src/components/Alerts/ResourceTable.test.tsx b/frontend-modern/src/components/Alerts/ResourceTable.test.tsxindex ac3b0edd99..6adf0837cb 100644--- a/frontend-modern/src/components/Alerts/ResourceTable.test.tsx+++ b/frontend-modern/src/components/Alerts/ResourceTable.test.tsx@@ -192,6 +192,28 @@ describe('ResourceTable', () => {expect(screen.getByText('my-vm-100')).toBeInTheDocument();});+ it('uses the governed label for policy-aware resources', () => {+ const props = makeProps({+ resources: [+ makeResource({+ id: 'vm-1',+ name: 'secret-vm-1',+ rawName: 'secret-vm-1',+ policy: {+ sensitivity: 'restricted',+ routing: { scope: 'local-only', redact: ['hostname'] },+ },+ aiSafeSummary: 'Production VM',+ }),+ ],+ });+ render(() => <ResourceTable {...props} />);++ expect(screen.getByText('Production VM')).toBeInTheDocument();+ expect(screen.getByLabelText('Edit thresholds for Production VM')).toBeInTheDocument();+ expect(screen.queryByText('secret-vm-1')).not.toBeInTheDocument();+ });+it('renders multiple resources', () => {const props = makeProps({resources: [diff --git a/frontend-modern/src/components/Alerts/ResourceTable.tsx b/frontend-modern/src/components/Alerts/ResourceTable.tsxindex f04ca54268..770b1b280c 100644--- a/frontend-modern/src/components/Alerts/ResourceTable.tsx+++ b/frontend-modern/src/components/Alerts/ResourceTable.tsx@@ -32,10 +32,12 @@ import {getAlertResourceTableResetFactoryDefaultsLabel,getAlertResourceTableRevertToDefaultsLabel,} from '@/utils/alertResourceTablePresentation';+import { getPreferredResourceDisplayName } from '@/utils/resourceIdentity';import {ALERT_BULK_EDIT_CLEAR_LABEL,getAlertBulkEditOpenLabel,} from '@/utils/alertBulkEditPresentation';+import type { Resource as UnifiedResource, ResourcePolicy } from '@/types/resource';const COLUMN_TOOLTIP_LOOKUP: Record<string, string> = {'cpu %': 'Percent CPU utilization allowed before an alert fires.',@@ -87,6 +89,8 @@ export interface Resource {id: string;name: string;displayName?: string;+ policy?: ResourcePolicy;+ aiSafeSummary?: string;rawName?: string;node?: string;instance?: string;@@ -451,13 +455,7 @@ export function ResourceTable(props: ResourceTableProps) {};const getResourceLabel = (resource: Resource): string => {- return (- resource.displayName ||- resource.name ||- resource.rawName ||- resource.clusterName ||- resource.id- );+ return getPreferredResourceDisplayName(resource as unknown as UnifiedResource);};const MetricValueWithHeat = (metricProps: {