From 55cde3edc35df30077837dccf424298de71ae9f6 Mon Sep 17 00:00:00 2001 From: Pulse Monitor Date: Mon, 8 Sep 2025 20:17:10 +0000 Subject: [PATCH] fix: add missing physicalDisks handler to WebSocket store (addresses #429) The disk monitoring backend was working but frontend wasn't updating because the WebSocket store was missing the handler for physicalDisks data. Also added physicalDisks count to broadcast logging for better debugging. --- frontend-modern/src/stores/websocket.ts | 1 + internal/monitoring/monitor.go | 1 + 2 files changed, 2 insertions(+) diff --git a/frontend-modern/src/stores/websocket.ts b/frontend-modern/src/stores/websocket.ts index 93c98a6f1..716902516 100644 --- a/frontend-modern/src/stores/websocket.ts +++ b/frontend-modern/src/stores/websocket.ts @@ -163,6 +163,7 @@ export function createWebSocketStore(url: string) { if (message.data.performance !== undefined) setState('performance', message.data.performance); if (message.data.connectionHealth !== undefined) setState('connectionHealth', message.data.connectionHealth); if (message.data.stats !== undefined) setState('stats', message.data.stats); + if (message.data.physicalDisks !== undefined) setState('physicalDisks', message.data.physicalDisks); // Sync active alerts from state if (message.data.activeAlerts !== undefined) { // Received activeAlerts update diff --git a/internal/monitoring/monitor.go b/internal/monitoring/monitor.go index 738ffc275..05439f2b0 100644 --- a/internal/monitoring/monitor.go +++ b/internal/monitoring/monitor.go @@ -481,6 +481,7 @@ func (m *Monitor) Start(ctx context.Context, wsHub *websocket.Hub) { Int("containers", len(state.Containers)). Int("pbs", len(state.PBSInstances)). Int("pbsBackups", len(state.PBSBackups)). + Int("physicalDisks", len(state.PhysicalDisks)). Msg("Broadcasting state update (ticker)") wsHub.BroadcastState(state)