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.

fix(alerts): surface node-level alerts on Proxmox node table

rcourtman5fc30e2060be
diff --git a/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx b/frontend-modern/src/features/proxmox/ProxmoxNodesTable.tsx
index f4b0c8fd61..0f1fdedbdf 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 b30b8ced03..108f8f647c 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<string, Alert>,
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);