From 5fc30e2060beb85e805380f982d76ba07066824c Mon Sep 17 00:00:00 2001 From: rcourtman Date: Sat, 27 Jun 2026 12:25:47 +0100 Subject: [PATCH] fix(alerts): surface node-level alerts on Proxmox node table getAlertStyles now accepts an optional nodeMatch parameter. Node table rows pass their node name so storage/topology/disk alerts (which have a different resourceId than the node) correctly highlight the affected node row. Previously ZFS pool errors on minipc were invisible on the overview page. --- .../src/features/proxmox/ProxmoxNodesTable.tsx | 2 +- frontend-modern/src/utils/alerts.ts | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) 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);