Skip to content

Commit 6d7cafc

Browse files
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

server/frontend/dist/assets/EqBars-B2lVBKYV.js renamed to server/frontend/dist/assets/EqBars-CLrMRveW.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/frontend/dist/assets/Nav-DoSHOOIY.js renamed to server/frontend/dist/assets/Nav-CtQ_u_9g.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/frontend/dist/assets/StreamCard-DQfhVKzv.js renamed to server/frontend/dist/assets/StreamCard-B1hAH_iC.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/frontend/dist/assets/VolumeKnob-BNUCuL8s.js renamed to server/frontend/dist/assets/VolumeKnob-BCstdxfI.js

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

Comments
 (0)