Repository navigation
feat(webserver): admin accounts with all-provider map and archive overrview - #65
Merged
Merged
Conversation
…rview Add an optional 'admins:' list to users.yml. Admin accounts are written to users.json with is_admin=true (no DB role, parser or SFTP account) and get /admin/realtime (all CMLs, coloured per provider) and /admin/archive (per-provider summary and daily time series). Cross-tenant queries run as webserver_role in a read-only session behind @admin_required.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #65 +/- ##
==========================================
+ Coverage 85.37% 85.78% +0.40%
==========================================
Files 41 41
Lines 3692 3911 +219
==========================================
+ Hits 3152 3355 +203
- Misses 540 556 +16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Admin view: all-providers map, archive overview and Grafana panel
Adds an optional
admins:list tousers.ymlfor web-login accounts that see data from all providers.What's new
/admin/realtime: Leaflet map of every CML across providers, with a Grafana RSL time series below it. Clicking a link selects that provider and CML in the panel./admin/archive: per-provider summary and daily record-count / mean-RSL plots./api/admin/cml-map,/api/admin/cml-stats,/api/admin/archive-timeseries. They are guarded by@admin_requiredand use a read-onlywebserver_roleconnection; tenants get 403.webserver_roledatasource and the dashboard ingrafana/admin_dashboards/(cml-admin-realtime).init_grafana.pycreates it only whenadmins:is set;scripts/generate_config.pywrites the admin org and users.--no-deps, so services are no longer recreated and the DB is no longer empty.Notes
adminas an admin id. Auth-proxy logins map to Grafana users by name, so it would hit Grafana's built-inadminaccount (documented in the README).webserver_roledev password is hardcoded ininit_grafana.py, like the tenant passwords there.admins:inusers.yml, runpython scripts/generate_config.py, runpython scripts/set_password.py <id>, then rebuildwebserverand re-runinit_grafana.Tests