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';