From 9517338351e0bd872a3f255b44fa536a9c083b44 Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 19 Mar 2025 13:48:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=9C=8B=E6=9D=BF=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/stats_dashboard/templates/index.html | 63 +++++++++++++++++++- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/plugins/stats_dashboard/templates/index.html b/plugins/stats_dashboard/templates/index.html index dd11f5d..53c316e 100644 --- a/plugins/stats_dashboard/templates/index.html +++ b/plugins/stats_dashboard/templates/index.html @@ -48,6 +48,57 @@ + + + + +
+ 平均响应时间 +
+
+ {{ avgResponseTime.toFixed(2) }} ms +
+
+
+
+ + + + + +
+ 热门用户 +
+ + + + +
+
+ + +
+ 热门群组 +
+ + + + +
+
+ + +
+ 热门插件 +
+ + + + +
+
+
+
@@ -85,6 +136,10 @@ successRate: 0, activeUsers: 0, activeGroups: 0, + avgResponseTime: 0, + topUsers: [], + topGroups: [], + topPlugins: [], pluginStats: [] } }, @@ -104,10 +159,14 @@ .then(response => { if (response.data.success) { const data = response.data.data; - this.totalCalls = data.total_calls || 0; - this.successRate = data.success_rate || 0; + this.totalCalls = parseInt(data.total_calls) || 0; + this.successRate = parseFloat(data.success_rate) || 0; this.activeUsers = data.active_users || 0; this.activeGroups = data.active_groups || 0; + this.avgResponseTime = data.avg_response_time || 0; + this.topUsers = data.top_users || []; + this.topGroups = data.top_groups || []; + this.topPlugins = data.top_plugins || []; } }) .catch(error => {