Skip to content

Added database badge to admin dashboard per request #9#14

Open
thezachwooten wants to merge 1 commit into
Verm1lion:mainfrom
thezachwooten:Add-runtime-mode-#9
Open

Added database badge to admin dashboard per request #9#14
thezachwooten wants to merge 1 commit into
Verm1lion:mainfrom
thezachwooten:Add-runtime-mode-#9

Conversation

@thezachwooten

Copy link
Copy Markdown

Summary

Adds a runtime database mode badge to the admin dashboard header, showing whether the instance is running SQLite or PostgreSQL.

Changes

  • Added db_mode detection in the dashboard route in web/app.py based on the DATABASE_URL environment variable
  • Passed db_mode to the dashboard template context
  • Added a badge to the existing header badge row in dashboard.html

Testing

Tested locally with SQLite — badge correctly displays "SQLite". PostgreSQL path follows the same logic, detecting the postgresql scheme in DATABASE_URL.

Notes

Also noticed that validation errors containing a ctx field with a Python exception object cause a TypeError when serializing to JSON in _api_error_response. Happy to address that in a separate PR if useful.

Added badge that should show correct database system is running on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant