Commit 55985a8
Add admin overview dashboard with aggregate stats and trend chart (#696)
- Add getAllUploads() DB function with JOIN to get github_login per row
- Add day index on usage_uploads for faster admin queries
- Admin dashboard (shown to is_admin users) includes:
- Aggregate stats card (today/7d/30d) with Active Users count
- Token usage trend chart for all users (by model/editor/by user)
- Top Users by token usage table (last 30 days)
- All Users list (collapsible, unchanged)
- By User grouping caps at top 10 users; others shown as 'Other'
- Admin today stats patched client-side using browser local timezone
- Admin section appears above personal data for immediate visibility
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent c943a5e commit 55985a8
2 files changed
Lines changed: 387 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
365 | 379 | | |
366 | 380 | | |
367 | 381 | | |
| |||
0 commit comments