diff --git a/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx index f4b0c8fd6..0f1fdedbd 100644 --- a/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx +++ b/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx @@ -338,7 +338,7 @@ export const ProxmoxNodesTable: Component<{ }; const pendingUpdates = () => drawerNode()?.pendingUpdates ?? 0; const alertStyles = createMemo(() => - getAlertStyles(node.id, activeAlerts, alertsEnabled()), + getAlertStyles(node.id, activeAlerts, alertsEnabled(), node.name), ); const alertAccentTone = createMemo< 'critical' | 'warning' | 'acknowledged' | undefined diff --git a/frontend-modern/src/utils/alerts.ts b/frontend-modern/src/utils/alerts.ts index b30b8ced0..108f8f647 100644 --- a/frontend-modern/src/utils/alerts.ts +++ b/frontend-modern/src/utils/alerts.ts @@ -16,18 +16,24 @@ const noAlertStyles = { hasAcknowledgedOnlyAlert: false, }; -// Get alert highlighting styles based on active alerts for a resource +// Get alert highlighting styles based on active alerts for a resource. +// When nodeMatch is provided, also includes alerts whose `node` field matches +// (covers storage/topology/disk alerts that belong to a node but have a +// different resourceId than the node itself). export const getAlertStyles = ( resourceId: string, activeAlerts: Record, alertsEnabled: boolean | undefined = isAlertsActivationEnabled(), + nodeMatch?: string, ) => { if (!alertsEnabled) { return noAlertStyles; } const alertsForResource = Object.values(activeAlerts).filter( - (alert) => alert.resourceId === resourceId, + (alert) => + alert.resourceId === resourceId || + (nodeMatch !== undefined && alert.node === nodeMatch), ); const unacknowledgedAlerts = alertsForResource.filter((alert) => !alert.acknowledged);