From f408667a3f9f2adb43df829822129eac84628b36 Mon Sep 17 00:00:00 2001 From: Mike Swanson Date: Sun, 28 Dec 2025 14:49:03 -0700 Subject: [PATCH] Auto-refresh dashboard and show client info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Support tab auto-refreshes every 3 seconds - Shows client hostname under code when connected - Changes Cancel button to Join button when connected - Added joinSession placeholder function 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- server/static/dashboard.html | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/server/static/dashboard.html b/server/static/dashboard.html index 3b45c93..71013c2 100644 --- a/server/static/dashboard.html +++ b/server/static/dashboard.html @@ -452,12 +452,18 @@ const created = new Date(code.created_at).toLocaleString(); const statusClass = code.status === "pending" ? "badge-warning" : code.status === "connected" ? "badge-success" : "badge-muted"; + const clientInfo = code.status === "connected" && code.client_name + ? '
' + code.client_name + '
' + : ''; + const actionBtn = code.status === "connected" + ? '' + : ''; return '' + - '' + code.code + '' + + '' + code.code + '' + clientInfo + '' + '' + code.status + '' + '' + created + '' + '' + (code.created_by || "Unknown") + '' + - '' + + '' + actionBtn + '' + ''; }).join(""); } catch (err) { @@ -475,7 +481,14 @@ } } + function joinSession(sessionId) { + // TODO: Open viewer in new window + alert("Viewer not yet implemented.\\n\\nSession ID: " + sessionId + "\\n\\nWebSocket: wss://connect.azcomputerguru.com/ws/viewer?session_id=" + sessionId); + } + + // Initial load and auto-refresh every 3 seconds loadSessions(); + setInterval(loadSessions, 3000); // Load connected machines (Access tab) let machines = [];