diff --git a/web/static/css/style.css b/web/static/css/style.css index 919996aa..7b8ef752 100644 --- a/web/static/css/style.css +++ b/web/static/css/style.css @@ -6238,6 +6238,7 @@ header { .mcp-stats-kpi__value--rate.is-success { color: #15803d; } .mcp-stats-kpi__value--rate.is-warning { color: #ca8a04; } .mcp-stats-kpi__value--rate.is-danger { color: #dc2626; } +.mcp-stats-kpi__value--rate.is-muted { color: var(--text-muted); } .mcp-stats-kpi__value--time { font-size: 0.875rem; @@ -6281,6 +6282,7 @@ header { .mcp-stats-kpi__status.is-success { color: #15803d; } .mcp-stats-kpi__status.is-warning { color: #ca8a04; } .mcp-stats-kpi__status.is-danger { color: #dc2626; } +.mcp-stats-kpi__status.is-muted { color: var(--text-muted); } /* ── 工具统计 + 调用趋势(合并面板) ── */ .mcp-stats-combined { @@ -7408,6 +7410,20 @@ tr.mcp-stats-tool-row[data-tool-name]:focus-visible { font-size: 0.875rem; } +.mcp-monitor-page .monitor-empty__title { + margin: 0 0 6px; + font-size: 0.875rem; + font-weight: 500; + color: var(--text-secondary); +} + +.mcp-monitor-page .monitor-empty__hint { + margin: 0; + font-size: 0.8125rem; + color: var(--text-muted); + line-height: 1.5; +} + .monitor-table { width: 100%; border-collapse: collapse; diff --git a/web/static/i18n/en-US.json b/web/static/i18n/en-US.json index b4230512..fa270f71 100644 --- a/web/static/i18n/en-US.json +++ b/web/static/i18n/en-US.json @@ -1499,6 +1499,7 @@ "loading": "Loading...", "noStatsData": "No statistical data", "noExecutions": "No execution records", + "emptyHint": "Execution records will appear here after you invoke MCP tools in chat or tasks", "noRecordsWithFilter": "No records with current filter", "paginationInfo": "Show {{start}}-{{end}} of {{total}} records", "perPageLabel": "Per page", diff --git a/web/static/i18n/zh-CN.json b/web/static/i18n/zh-CN.json index ab653a16..59d7a337 100644 --- a/web/static/i18n/zh-CN.json +++ b/web/static/i18n/zh-CN.json @@ -1488,6 +1488,7 @@ "loading": "加载中...", "noStatsData": "暂无统计数据", "noExecutions": "暂无执行记录", + "emptyHint": "在对话或任务中调用 MCP 工具后,执行记录将显示在此处", "noRecordsWithFilter": "当前筛选条件下暂无记录", "paginationInfo": "显示 {{start}}-{{end}} / 共 {{total}} 条记录", "perPageLabel": "每页显示", diff --git a/web/static/js/monitor.js b/web/static/js/monitor.js index a3d65ef8..e08b84e1 100644 --- a/web/static/js/monitor.js +++ b/web/static/js/monitor.js @@ -4387,12 +4387,13 @@ function bindMonitorStatsPanelEvents() { monitorStatsPanelEventsBound = true; } -function renderMcpStatsMetricsBar(totals, successRate, rateTone, rateSubText, lastCallText) { +function renderMcpStatsMetricsBar(totals, successRate, rateTone, rateSubText, lastCallText, hasCalls = true) { const totalCallsLabel = mcpMonitorT('totalCalls') || '总调用次数'; const successRateLabel = mcpMonitorT('successRate') || '成功率'; const lastCallLabel = mcpMonitorT('lastCall') || '最近一次调用'; const successPill = mcpMonitorT('successCount', { n: totals.success }) || `成功 ${totals.success}`; const failedPill = mcpMonitorT('failedCount', { n: totals.failed }) || `失败 ${totals.failed}`; + const rateValue = hasCalls ? `${successRate}%` : successRate; return `
${escapeHtml(noExecutions)}
+${escapeHtml(emptyHint)}
+