From d01fb4173f24d6007989ca3befb2a8598181b61e Mon Sep 17 00:00:00 2001 From: Mike Swanson Date: Sun, 28 Dec 2025 18:41:47 -0700 Subject: [PATCH] Fix sidebar counts to use is_online status --- server/static/dashboard.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/static/dashboard.html b/server/static/dashboard.html index 6f7318c..982ab83 100644 --- a/server/static/dashboard.html +++ b/server/static/dashboard.html @@ -648,10 +648,12 @@ const response = await fetch("/api/sessions"); machines = await response.json(); - // Update counts + // Update counts based on is_online status + const onlineCount = machines.filter(m => m.is_online).length; + const offlineCount = machines.filter(m => !m.is_online).length; document.getElementById("countAll").textContent = machines.length; - document.getElementById("countOnline").textContent = machines.length; - document.getElementById("countOffline").textContent = "0"; + document.getElementById("countOnline").textContent = onlineCount; + document.getElementById("countOffline").textContent = offlineCount; renderMachinesList(); } catch (err) {