feat: Live Dashboard redesign — 6 columns, hover details, last-alert column

Replaces the 11-column table with severity-sorted record rows: host,
combined status chip, latency, alert chips, time-in-state, and the most
recent alert message. Per-family address/state/latency/last-change move
to a hover card on the status chip and permanently to a new Connectivity
table in the Host Overview info section (host info API now includes
connections). Last-alert is seeded from /api/0/alerts and kept fresh
from the event stream; the event log below uses the same row idiom with
its filters intact. WS reconnect state shows in the toolbar instead of
a modal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NfPpSpccTWBfZg1FTveyaU
This commit is contained in:
2026-07-10 13:45:03 -04:00
co-authored by Claude Fable 5
parent 5d9f161706
commit 8d268adf70
4 changed files with 524 additions and 670 deletions
+28
View File
@@ -172,3 +172,31 @@ def test_build_host_info_covers_empty_when_exact_matches_only():
result = _build_host_info(host, threshold_checker=checker)
t = result["thresholds"][0]
assert t["covers"] == []
class _FakeConnFull:
def __init__(self, afam, addr, state, rtt, statetime, lastbeat):
self.afam = afam
self.addr = addr
self.state = state
self.rtts = [rtt]
self.statetime = statetime
self.lastbeat = lastbeat
def test_build_host_info_includes_connections():
host = _FakeHost(connections={
"IPv4": _FakeConnFull("IPv4", "10.0.0.5", "up", 14.2, 1000.0, 2000.0),
"IPv6": _FakeConnFull("IPv6", "fd00::5", "overdue", 0, 1500.0, 1900.0),
})
result = _build_host_info(host)
conns = {c["family"]: c for c in result["connections"]}
assert conns["IPv4"] == {"family": "IPv4", "addr": "10.0.0.5", "state": "up",
"rtt": 14.2, "statetime": 1000.0, "lastbeat": 2000.0}
assert conns["IPv6"]["state"] == "overdue"
def test_build_host_info_connections_empty():
host = _FakeHost()
result = _build_host_info(host)
assert result["connections"] == []