Add Presence tab, RSSI chart, heartbeat; fix SSE flood, chart timezone, N+1 clients query

This commit is contained in:
bot
2026-04-03 21:50:41 +03:00
parent a73aae21ad
commit cbef4143ee
5 changed files with 376 additions and 9 deletions
+93
View File
@@ -27,6 +27,7 @@
<button class="tab-btn" id="tab-networks" onclick="showNetworks()">Networks</button>
<button class="tab-btn" id="tab-crossnode" onclick="showCrossNode()">Cross-node</button>
<button class="tab-btn" id="tab-clients" onclick="showClients()">Clients</button>
<button class="tab-btn" id="tab-presence" onclick="showPresence()">Presence</button>
</div>
<!-- Sidebar -->
@@ -211,6 +212,98 @@
</div>
</div>
<!-- Presence view -->
<div id="view-presence" class="view">
<!-- Present now -->
<div class="section-header">
<span class="section-title">Present Now</span>
<span class="section-count" id="present-count"></span>
<span class="presence-sub">real MACs · seen 2+ times in last hour</span>
</div>
<div class="tbl-wrap">
<table>
<thead><tr>
<th>MAC</th><th>Vendor</th><th>Best RSSI</th><th>Avg RSSI</th>
<th>Times Seen</th><th>Nodes</th><th>Last Seen</th>
</tr></thead>
<tbody id="present-tbody"></tbody>
</table>
<div class="empty" id="present-empty" style="display:none">No devices currently present.</div>
</div>
<!-- New arrivals -->
<div class="section-header" style="margin-top:8px">
<span class="section-title">New Arrivals</span>
<span class="section-count" id="arrivals-count"></span>
<span class="presence-sub">first seen in last 24h</span>
</div>
<div class="presence-split">
<div>
<div class="presence-sub-label">Devices</div>
<div class="tbl-wrap">
<table>
<thead><tr>
<th>MAC</th><th>Vendor</th><th>First Seen</th>
<th>Best RSSI</th><th>Times Seen</th>
</tr></thead>
<tbody id="arrivals-macs-tbody"></tbody>
</table>
<div class="empty" id="arrivals-macs-empty" style="display:none">No new devices.</div>
</div>
</div>
<div>
<div class="presence-sub-label">Networks</div>
<div class="tbl-wrap">
<table>
<thead><tr>
<th>SSID</th><th>BSSID</th><th>First Seen</th>
<th>Best RSSI</th><th>Ch</th><th>Enc</th>
</tr></thead>
<tbody id="arrivals-nets-tbody"></tbody>
</table>
<div class="empty" id="arrivals-nets-empty" style="display:none">No new networks.</div>
</div>
</div>
</div>
<!-- Regulars -->
<div class="section-header" style="margin-top:8px">
<span class="section-title">Regulars</span>
<span class="section-count" id="regulars-count"></span>
<span class="presence-sub">seen on 2+ distinct days</span>
</div>
<div class="presence-split">
<div>
<div class="presence-sub-label">Devices</div>
<div class="tbl-wrap">
<table>
<thead><tr>
<th>MAC</th><th>Vendor</th><th>Days Seen</th>
<th>First Seen</th><th>Last Seen</th><th>Best RSSI</th>
</tr></thead>
<tbody id="regulars-macs-tbody"></tbody>
</table>
<div class="empty" id="regulars-macs-empty" style="display:none">Regulars appear after 2+ days of data.</div>
</div>
</div>
<div>
<div class="presence-sub-label">Networks</div>
<div class="tbl-wrap">
<table>
<thead><tr>
<th>SSID</th><th>BSSID</th><th>Days Seen</th>
<th>First Seen</th><th>Best RSSI</th><th>Ch</th>
</tr></thead>
<tbody id="regulars-nets-tbody"></tbody>
</table>
<div class="empty" id="regulars-nets-empty" style="display:none">Regulars appear after 2+ days of data.</div>
</div>
</div>
</div>
</div><!-- /#view-presence -->
</div><!-- /#main -->
</div><!-- /#app -->