Skip to content

Admin console improvements - #324

Closed
lucaspar wants to merge 0 commit into
masterfrom
lp/admin-improvements
Closed

Admin console improvements#324
lucaspar wants to merge 0 commit into
masterfrom
lp/admin-improvements

Conversation

@lucaspar

@lucaspar lucaspar commented Jul 24, 2026

Copy link
Copy Markdown
Member

Merged as #326

  • Admin console
    • Added a service health overview to the home console, if possible
    • Fixed 500 errors when searching things
    • More useful columns in admin console tables
    • Health dashboard and system overview as admin home
    • Safeguards to prevent operators from being locked out in case the dashboard fails to render
  • Observability
    • Production config preserves logs in a Docker volume

Note

Medium Risk
Touches production compose and logging plus admin index monkey-patching and heavier dashboard queries on every admin home load; failures are mitigated by fallback context but deploy still needs the new volume and writable /app/logs.

Overview
Replaces the default Django admin index with a Gateway Dashboard that surfaces file/capture/dataset/user counts, soft-delete cleanup candidates, recent signups, staff listings, top storage users, and system health from SystemHealthSnapshot. Dashboard data is assembled in sds_gateway/admin.py (monkey-patched admin.site.index) with a DB-error fallback so a failed query does not block admin access.

Admin changelists across api_methods, users, and visualizations gain richer columns (counts, formatted sizes, owner emails) and queryset tuning (select_related / annotate). Search is adjusted to use valid relations (e.g. owner__email, sum_blake3 on File) to avoid admin search 500s.

Production observability: compose.production.yaml adds a shared sds-gateway-prod-app-logs volume at /app/logs for app and Celery services; production.py creates that path and writes rotating logs to /app/logs/gateway.log alongside console output.

Minor: static_cache_busting caches version.json at startup; missing version file logs at debug in dev.

Reviewed by Cursor Bugbot for commit 5842ebb. Configure here.

@lucaspar lucaspar self-assigned this Jul 24, 2026
@lucaspar lucaspar added gateway Gateway component styling Special focus on styling of front-end components labels Jul 24, 2026
@lucaspar
lucaspar marked this pull request as ready for review July 27, 2026 15:15

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 4 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5842ebb. Configure here.

Comment thread gateway/sds_gateway/api_methods/admin.py
Comment thread gateway/config/settings/production.py
Comment thread gateway/sds_gateway/admin.py
Comment thread gateway/sds_gateway/api_methods/admin.py
@lucaspar
lucaspar force-pushed the lp/admin-improvements branch from 68a76fb to f82d2ab Compare July 27, 2026 15:29
@lucaspar lucaspar closed this Jul 27, 2026
@lucaspar
lucaspar force-pushed the lp/admin-improvements branch from f82d2ab to e159931 Compare July 27, 2026 16:39
lucaspar added a commit that referenced this pull request Jul 27, 2026
@lucaspar
lucaspar deleted the lp/admin-improvements branch July 27, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway component styling Special focus on styling of front-end components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant