From 3258584958d68c0649406aaf2f77147b7840dc89 Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 19 Mar 2025 13:53:45 +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/message_summary/main.py | 2 +- plugins/stats_collector/main.py | 2 +- plugins/stats_dashboard/templates/index.html | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/message_summary/main.py b/plugins/message_summary/main.py index 3bb9b4c..5c1b16c 100644 --- a/plugins/message_summary/main.py +++ b/plugins/message_summary/main.py @@ -17,7 +17,7 @@ class MessageSummaryPlugin(MessagePluginInterface): @property def name(self) -> str: - return "message_summary" + return "群聊消息总结" @property def version(self) -> str: diff --git a/plugins/stats_collector/main.py b/plugins/stats_collector/main.py index 69474ab..b27e23f 100644 --- a/plugins/stats_collector/main.py +++ b/plugins/stats_collector/main.py @@ -17,7 +17,7 @@ class StatsCollectorPlugin(PluginInterface): @property def name(self) -> str: - return "command collector" + return "群聊指令数据记录" @property def version(self) -> str: diff --git a/plugins/stats_dashboard/templates/index.html b/plugins/stats_dashboard/templates/index.html index 53c316e..2c995ed 100644 --- a/plugins/stats_dashboard/templates/index.html +++ b/plugins/stats_dashboard/templates/index.html @@ -56,7 +56,7 @@ 平均响应时间
- {{ avgResponseTime.toFixed(2) }} ms + {{ typeof avgResponseTime === 'number' ? avgResponseTime.toFixed(2) : '0.00' }} ms
@@ -136,7 +136,7 @@ successRate: 0, activeUsers: 0, activeGroups: 0, - avgResponseTime: 0, + avgResponseTime: 0, // 确保这里初始化为数字 topUsers: [], topGroups: [], topPlugins: [], @@ -163,7 +163,7 @@ 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.avgResponseTime = parseFloat(data.avg_response_time) || 0; this.topUsers = data.top_users || []; this.topGroups = data.top_groups || []; this.topPlugins = data.top_plugins || [];