Commit 6d7cafc
committed
feat(dashboard): real listeners-over-time chart sourced from listener_histories
The dashboard had a placeholder bar chart that always rendered fake
data. Replace it with a per-mount SVG line chart that pulls actual
samples from the listener_histories table via /admin/insights.
Backend
-------
handleInsights now accepts ?hours=N (default 24, max 168 = 7d) and
?max_points=N (default 200, max 2000). Series longer than max_points
are bucket-averaged server-side so a 7-day view does not ship ~10k
rows per stream.
Frontend
--------
New <ListenerHistoryChart range={1H|24H|7D}/>: hand-rolled SVG line
chart, no third-party dep, ~240 LOC. One coloured polyline per source
mount with a legend showing peak listeners; auto-MP3 transcoder
mirrors are filtered from the legend (their curve is identical to
their source by construction). Y-axis auto-scales to peak; X-axis
labels adapt to the chosen window.
Time-range tabs that were already present on the dashboard now
actually drive the fetch instead of being decorative. Cached per
range so flipping tabs does not refetch.1 parent f71ce7e commit 6d7cafc
29 files changed
Lines changed: 412 additions & 132 deletions
File tree
- server
- frontend
- dist
- assets
- src/entries
- src
- components
- pages/admin
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments