feat(tautulli): expand the Plex Activity page — stats, graphs, per-user filter & users table#62
Open
ndandan wants to merge 15 commits into
Open
feat(tautulli): expand the Plex Activity page — stats, graphs, per-user filter & users table#62ndandan wants to merge 15 commits into
ndandan wants to merge 15 commits into
Conversation
…alth chips Adds a read-only Tautulli integration (configured in /admin/settings, behind the per-service health circuit breaker) that surfaces current Plex activity: - Dashboard "Current Plex activity" widget — active streams, Direct Play / Direct Stream / Transcode counts, total/LAN/WAN bandwidth, per-session cards (quality, HDR/SDR badge, source->target codec on transcode). Hydrates async and refreshes every 10s; fails open so a down Tautulli never breaks the page. - Dedicated Plex Activity page (own sidebar entry): now-playing strip, watch stats with a 7/30/90-day toggle, plays-over-time graphs (Media/Stream-type toggle, by-hour, by-day-of-week, platform x stream-type problem-clients), dense history grid, per-library counts, and an in-app info modal per title. - API key stays server-side; every response is sanitised before the browser. - Chart.js self-hosted for CSP compliance, reused by the Radarr stats chart. Also reworks the dashboard service-health chips to show latency: HealthService::statusFor() returns a status word + round-trip ms (cached 10s, isHealthy() now delegates to it and keeps its old contract). Chips render five states (up / slow / very_slow / down / degraded) with a coloured dot. Tests: TautulliClient (HTTP + normalizers + edge cases), TautulliController (endpoints + route guard), HealthService statusFor/classifyLatency, and the relative_date Twig filter.
…pe & concurrent graphs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plex Activity page — statistics, graphs & a per-user filter
Builds on the optional Tautulli integration to expand the Plex Activity page. All additive, read-only, fail-open, and i18n'd (en/fr).
What's new
Xh Ym).Safety / design
get_home_stats,get_users_table,get_user_names,get_plays_by_*,get_concurrent_streams_by_stream_type. No mutating commands.user_idis a filter token only (query param /<option value>), never rendered.metricis clamped toplays|duration; the user filter is digits-only or empty.[]/{categories:[],series:[]}) when Tautulli is disabled / unconfigured / unreachable; no 500s.Verification
metric/userinputs).lint:twig+lint:yamlclean.Stacking
This is stacked on #60 (
pr/tautulli-activity), since it extends that page. Until #60 merges, this PR's diff includes #60's commits; once #60 lands I'll rebase so it collapses to the ~9-file stats delta. Fork-only files (docs/FORK-CHANGES.md,ghcr.yml, screenshots) are excluded as usual.