From 58293a94a79e958fa0f8d01cd96f1c25bd228ce2 Mon Sep 17 00:00:00 2001 From: Zachary Wooten Date: Mon, 27 Apr 2026 00:32:56 -0400 Subject: [PATCH] Added database badge to admin dashboard per request #9 Added badge that should show correct database system is running on. --- web/app.py | 2 ++ web/templates/dashboard.html | 3 +++ 2 files changed, 5 insertions(+) diff --git a/web/app.py b/web/app.py index 870f784..551cdd8 100644 --- a/web/app.py +++ b/web/app.py @@ -580,6 +580,7 @@ async def dashboard( else [] ) admin_users = _get_user_payloads(db, include_inactive=True) if can_manage_results else [] + db_mode = "SQLite" if os.getenv("DATABASE_URL", "sqlite://").startswith("sqlite") else "PostgreSQL" return render_template( request=request, name="dashboard.html", @@ -607,6 +608,7 @@ async def dashboard( "limit": audit_limit, }, "workspace_copy": _workspace_copy(current_user.role), + "db_mode": db_mode, }, ) diff --git a/web/templates/dashboard.html b/web/templates/dashboard.html index 3b81551..5ac0788 100644 --- a/web/templates/dashboard.html +++ b/web/templates/dashboard.html @@ -256,6 +256,9 @@

Stress-Strain Inte Management: {% if can_manage_results %}admin only{% else %}read only{% endif %} + + Database: {{ db_mode }} +