stats: add 1h, 4h, 3d time range windows

Adds Hour (5-min buckets), FourHour (15-min buckets), and ThreeDay
(hourly buckets) to the Window enum, plus the matching tab buttons
in stats.html. Simplifies web_ui.rs to use Window::span_secs()
instead of a duplicate match.

Closes #25
This commit is contained in:
iris 2026-05-20 20:10:20 +02:00 committed by Mara
parent 4bb3877460
commit f9d1e69a50
3 changed files with 24 additions and 10 deletions

View file

@ -68,7 +68,10 @@
</div>
<div class="window-tabs" id="window-tabs">
<button data-w="1h">last 1h</button>
<button data-w="4h">last 4h</button>
<button data-w="24h" class="active">last 24h</button>
<button data-w="3d">last 3d</button>
<button data-w="7d">last 7d</button>
<button data-w="30d">last 30d</button>
</div>