From ad3b94c168387416b7554724b969690b8515769f Mon Sep 17 00:00:00 2001 From: Petr Date: Tue, 10 Mar 2026 22:52:48 +0100 Subject: [PATCH] Add Business Metrics card to dashboard --- webapp/app.py | 4 ++++ webapp/templates/dashboard.html | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/webapp/app.py b/webapp/app.py index f7665ca..112f9e8 100644 --- a/webapp/app.py +++ b/webapp/app.py @@ -526,6 +526,9 @@ def register_routes(app: Flask) -> None: # Activity Center summary for dashboard widget (empty fallback) activity_summary = {} + # Load business metrics for dashboard widget + metrics_data = _load_metrics_data() + return render_template( "dashboard.html", user=user, @@ -543,6 +546,7 @@ def register_routes(app: Flask) -> None: sync_settings=sync_settings, account_details=account_details, activity_summary=activity_summary, + metrics_data=metrics_data, ) @app.route("/catalog") diff --git a/webapp/templates/dashboard.html b/webapp/templates/dashboard.html index a36bc3a..1d44365 100644 --- a/webapp/templates/dashboard.html +++ b/webapp/templates/dashboard.html @@ -1957,6 +1957,33 @@ + {% if metrics_data %} + {% set metrics_total = namespace(n=0) %} + {% for c in metrics_data %}{% set metrics_total.n = metrics_total.n + c.metrics|length %}{% endfor %} +
+
+
+
+ + + + +
+
+
Business Metrics
+
+ {{ metrics_total.n }} metrics across {{ metrics_data|length }} categories +
+
+
+ Always included +
+
+ {% for c in metrics_data %}{{ c.label }} ({{ c.metrics|length }}){% if not loop.last %}, {% endif %}{% endfor %} +
+
+ {% endif %} +
Manage your data subscriptions or discover new data sources