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 => {