From 88fd31ca8ccbc5d4d38dd9eec0673d2f097021e5 Mon Sep 17 00:00:00 2001 From: Jaakko Vanhala Date: Sun, 5 Apr 2026 08:39:48 +0300 Subject: [PATCH] =?UTF-8?q?Hub-yhteyden=20tila=20omaksi=20status-palkiksi?= =?UTF-8?q?=20terminaalin=20yl=C3=A4puolelle=20(agents-n=C3=A4kym=C3=A4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- network-poc/static/index.html | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/network-poc/static/index.html b/network-poc/static/index.html index 98f571e..23ae9fe 100644 --- a/network-poc/static/index.html +++ b/network-poc/static/index.html @@ -1090,9 +1090,12 @@ -
-
$ kpn hub connect wss://localhost
-
✓ Yhdistetty Kipinä Hubiin
+
+ + Hub: + Yhdistetään... +
+
$ @@ -1634,6 +1637,12 @@ const uiSocket = new WebSocket(`${window.location.protocol === 'https:' ? 'wss:' : 'ws:'}//${window.location.host}/ws`); window._uiSocket = uiSocket; uiSocket.onopen = async () => { + // Päivitetään agents-näkymän hub-status + const hubDot = document.getElementById('agent-hub-dot'); + const hubLabel = document.getElementById('agent-hub-label'); + if (hubDot) hubDot.style.background = '#3fb950'; + if (hubLabel) { hubLabel.textContent = 'Yhdistetty'; hubLabel.style.color = '#3fb950'; } + // Päivitetään molemmat statukset const el = document.getElementById('node-status'); el.textContent = 'Connected'; @@ -1681,6 +1690,11 @@ })); }; uiSocket.onclose = () => { + const hubDot = document.getElementById('agent-hub-dot'); + const hubLabel = document.getElementById('agent-hub-label'); + if (hubDot) hubDot.style.background = '#f85149'; + if (hubLabel) { hubLabel.textContent = 'Yhteys katkennut'; hubLabel.style.color = '#f85149'; } + const el = document.getElementById('node-status'); el.textContent = 'Disconnected'; el.style.color = '#f85149';