Feat: add SLM live monitoring improvements #60

Merged
serversdown merged 13 commits from feat/slm-live-monitor into dev 2026-06-10 16:33:26 -04:00
Showing only changes of commit 17a1a83bdf - Show all commits
+5 -1
View File
@@ -280,7 +280,7 @@ function startDashboardStream() {
}
const wsProtocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
const wsUrl = `${wsProtocol}//${window.location.host}/api/slmm/${window.selectedUnitId}/live`;
const wsUrl = `${wsProtocol}//${window.location.host}/api/slmm/${window.selectedUnitId}/monitor`;
window.dashboardWebSocket = new WebSocket(wsUrl);
@@ -293,6 +293,10 @@ function startDashboardStream() {
window.dashboardWebSocket.onmessage = function(event) {
try {
const data = JSON.parse(event.data);
// /monitor sends keepalive 'heartbeat' frames (no metrics) and a per-frame
// 'feed_status'; skip heartbeats and offline frames so they don't blank the
// metrics or spike the chart with zeros.
if (data.heartbeat || data.feed_status === 'unreachable') return;
updateDashboardMetrics(data);
updateDashboardChart(data);
} catch (error) {