From cbebb759101f592bd2e272628e15be92d769f3c2 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Wed, 20 Aug 2025 09:29:21 +0200 Subject: [PATCH] Added widget to display global stats about the instance --- frontend/src/api/admin.js | 3 ++ .../dashboard/GlobalStatisticsWidget.vue | 36 +++++++++++++++++++ frontend/src/views/DashboardView.vue | 10 ++++++ modoboa/core/api/v2/serializers.py | 8 +++++ modoboa/core/api/v2/tests.py | 18 ++++++++++ modoboa/core/api/v2/urls.py | 5 +++ modoboa/core/api/v2/views.py | 21 ++++++++++- 7 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 frontend/src/components/admin/dashboard/GlobalStatisticsWidget.vue diff --git a/frontend/src/api/admin.js b/frontend/src/api/admin.js index 901753702..cd2e05b67 100644 --- a/frontend/src/api/admin.js +++ b/frontend/src/api/admin.js @@ -10,4 +10,7 @@ export default { getNewsFeed() { return repository.get('/admin/news_feed/') }, + getStatistics() { + return repository.get('/admin/statistics/') + }, } diff --git a/frontend/src/components/admin/dashboard/GlobalStatisticsWidget.vue b/frontend/src/components/admin/dashboard/GlobalStatisticsWidget.vue new file mode 100644 index 000000000..89d6fdb8d --- /dev/null +++ b/frontend/src/components/admin/dashboard/GlobalStatisticsWidget.vue @@ -0,0 +1,36 @@ + + + diff --git a/frontend/src/views/DashboardView.vue b/frontend/src/views/DashboardView.vue index 0c6f2805b..43ee28e2f 100644 --- a/frontend/src/views/DashboardView.vue +++ b/frontend/src/views/DashboardView.vue @@ -7,7 +7,12 @@ + + @@ -15,10 +20,15 @@