From 298478e36d5751eac63a0b0aca555ec964b9c73e Mon Sep 17 00:00:00 2001 From: Roby Date: Tue, 20 Oct 2026 17:39:22 +0200 Subject: [PATCH] feat(dashboard): estensione filtro nodo globale sulla UI - Aggiunto all'evento onchange del menu a tendina. - Implementata logica lato client in index.html per filtrare dinamicamente i transiti. - Ora la selezione di un singolo nodo isola sia i widget statistici che lo storico dei log sottostante, senza interferire con i log grezzi della vista NODES --- templates/index.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/templates/index.html b/templates/index.html index a6b9d70..9546533 100644 --- a/templates/index.html +++ b/templates/index.html @@ -196,7 +196,7 @@

📊 DAILY STATISTICS

- @@ -1100,7 +1100,11 @@ if (!networkLogs[clientId]) networkLogs[clientId] = ""; networkLogs[clientId] += `
[${esc(time)}] [${esc(protocol)}] ${esc(source.replace("🌐", "").trim())}
`; } else { - tableHTML += `${esc(time)}${esc(String(clientId).toUpperCase())}${esc(protocol)}${modeDisplay}${sourceBadge}${esc(slotDisplay)}${sourceHtml}${esc(target.trim())}${esc(row[6])}s${esc(row[7])}%${rssiDisplay}`; + // FILTRO TENDINA: Controlla il nodo selezionato prima di aggiungere la riga + const selectedFilter = document.getElementById('stat-node-filter').value; + if (selectedFilter === 'all' || String(clientId).toLowerCase() === selectedFilter) { + tableHTML += `${esc(time)}${esc(String(clientId).toUpperCase())}${esc(protocol)}${modeDisplay}${sourceBadge}${esc(slotDisplay)}${sourceHtml}${esc(target.trim())}${esc(row[6])}s${esc(row[7])}%${rssiDisplay}`; + } } }); tbody.innerHTML = tableHTML;