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 %} +