feat(webui): live-update topology fan tiles without a page reload

Each fan tile carries data-fan / data-ceil / data-measured and a small
script polls /api/metrics/latest every 5s — the metrics collector's own
sampling period, served from memory with no extra BMC call — updating
each tile's spin rate, duty fill and tooltip in place. Polling faster
would only re-read identical numbers; sampling the BMC faster would
choke it under load. FanReading gains json tags for the endpoint.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019VHG21rgTUiR1G3qFHTVmN
This commit is contained in:
Mikhail Chusavitin
2026-09-04 12:09:37 +03:00
co-authored by Claude Sonnet 5
parent d8b05069e0
commit a4853a0a4f
3 changed files with 51 additions and 6 deletions
+2 -2
View File
@@ -32,8 +32,8 @@ type FanCheckOptions struct {
// FanReading holds one fan sensor reading.
type FanReading struct {
Name string
RPM float64
Name string `json:"name"`
RPM float64 `json:"rpm"`
}
type cachedPowerReading struct {