diff options
| author | Ben Sima <ben@bensima.com> | 2025-11-22 09:22:42 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-11-22 09:22:42 -0500 |
| commit | 820f0a03c5df1359f08ece9ad9d7383b91527608 (patch) | |
| tree | 1aa24c7d7a6bb88dccef421a721003e8539553cc /Biz/PodcastItLater/Admin.py | |
| parent | 26b8a657d00e76d1e54eeaf78246b1bf4b03fb43 (diff) | |
| parent | 0eafc36823e72ce70083cf55be8533087c0b1139 (diff) | |
Merge task t-rWbMpxaBk: Metrics view in Admin dashboard
Diffstat (limited to 'Biz/PodcastItLater/Admin.py')
| -rw-r--r-- | Biz/PodcastItLater/Admin.py | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/Biz/PodcastItLater/Admin.py b/Biz/PodcastItLater/Admin.py index 6faf7fb..6f60948 100644 --- a/Biz/PodcastItLater/Admin.py +++ b/Biz/PodcastItLater/Admin.py @@ -157,6 +157,59 @@ class MetricsDashboard(Component[AnyChildren, MetricsAttrs]): return UI.PageLayout( html.div( html.h2( + html.i(classes=["bi", "bi-people", "me-2"]), + "Growth & Usage", + classes=["mb-4"], + ), + # Growth & Usage cards + html.div( + html.div( + html.div( + MetricCard( + title="Total Users", + value=metrics.get("total_users", 0), + icon="bi-people", + ), + classes=["card", "shadow-sm"], + ), + classes=["col-md-3"], + ), + html.div( + html.div( + MetricCard( + title="Active Subs", + value=metrics.get("active_subscriptions", 0), + icon="bi-credit-card", + ), + classes=["card", "shadow-sm"], + ), + classes=["col-md-3"], + ), + html.div( + html.div( + MetricCard( + title="Submissions (24h)", + value=metrics.get("submissions_24h", 0), + icon="bi-activity", + ), + classes=["card", "shadow-sm"], + ), + classes=["col-md-3"], + ), + html.div( + html.div( + MetricCard( + title="Submissions (7d)", + value=metrics.get("submissions_7d", 0), + icon="bi-calendar-week", + ), + classes=["card", "shadow-sm"], + ), + classes=["col-md-3"], + ), + classes=["row", "g-3", "mb-5"], + ), + html.h2( html.i(classes=["bi", "bi-graph-up", "me-2"]), "Episode Metrics", classes=["mb-4"], |
