diff --git a/server/static/dashboard.html b/server/static/dashboard.html index 982ab83..edc824b 100644 --- a/server/static/dashboard.html +++ b/server/static/dashboard.html @@ -642,6 +642,18 @@ // Load connected machines (Access tab) let machines = []; let selectedMachine = null; + let currentFilter = 'all'; // 'all', 'online', 'offline' + + // Setup filter click handlers + document.querySelectorAll('.sidebar-item[data-filter]').forEach(item => { + item.addEventListener('click', () => { + currentFilter = item.dataset.filter; + // Update active state + document.querySelectorAll('.sidebar-item[data-filter]').forEach(i => i.classList.remove('active')); + item.classList.add('active'); + renderMachinesList(); + }); + }); async function loadMachines() { try { @@ -664,12 +676,23 @@ function renderMachinesList() { const container = document.getElementById("machinesList"); - if (machines.length === 0) { - container.innerHTML = '
Install the agent on a machine to see it here
' + msg + '