From 3aecdc275f53ff5171f36912d8cf1def4468c94f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AC=E6=98=8E?= <83812544+Ed1s0nZ@users.noreply.github.com> Date: Wed, 11 Feb 2026 00:44:12 +0800 Subject: [PATCH] Add files via upload --- web/static/css/style.css | 385 ++++++++++--------------------------- web/static/js/dashboard.js | 26 +-- web/templates/index.html | 10 +- 3 files changed, 113 insertions(+), 308 deletions(-) diff --git a/web/static/css/style.css b/web/static/css/style.css index db5ccb51..d03c4c3c 100644 --- a/web/static/css/style.css +++ b/web/static/css/style.css @@ -22,11 +22,6 @@ --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1); --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15); - /* 对话页专用 */ - --chat-bg: linear-gradient(180deg, #f0f4f8 0%, #e8eef4 50%, #f2f6fa 100%); - --chat-bubble-user: linear-gradient(135deg, #2563eb 0%, #0066ff 50%, #0052cc 100%); - --chat-bubble-assistant: #ffffff; - --chat-sidebar-bg: linear-gradient(180deg, #fcfdfe 0%, #f6f8fb 100%); } body { @@ -455,23 +450,13 @@ body { .conversation-sidebar { width: 280px; - background: var(--chat-sidebar-bg); + background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; flex-shrink: 0; height: 100%; overflow: hidden; - box-shadow: 4px 0 24px rgba(0, 0, 0, 0.03); -} - -.conversation-sidebar .sidebar-content::-webkit-scrollbar { - width: 6px; -} - -.conversation-sidebar .sidebar-content::-webkit-scrollbar-thumb { - background: rgba(0, 0, 0, 0.12); - border-radius: 3px; } header { @@ -768,26 +753,25 @@ header { .new-chat-btn { width: 100%; - padding: 11px 16px; - background: linear-gradient(135deg, var(--accent-color) 0%, #0052cc 100%); + padding: 10px 16px; + background: var(--accent-color); color: white; border: none; - border-radius: 10px; + border-radius: 8px; font-size: 0.9375rem; font-weight: 500; cursor: pointer; - transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); + transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; - box-shadow: 0 2px 8px rgba(0, 102, 255, 0.25); } .new-chat-btn:hover { - background: linear-gradient(135deg, #0052cc 0%, var(--accent-color) 100%); - transform: translateY(-2px); - box-shadow: 0 4px 14px rgba(0, 102, 255, 0.35); + background: var(--accent-hover); + transform: translateY(-1px); + box-shadow: var(--shadow-sm); } .new-chat-btn span { @@ -822,7 +806,7 @@ header { width: 100%; padding: 8px 32px 8px 12px; border: 1px solid var(--border-color); - border-radius: 10px; + border-radius: 6px; font-size: 0.875rem; background: var(--bg-primary); color: var(--text-primary); @@ -1018,19 +1002,9 @@ header { flex-direction: column; flex: 1; min-width: 0; - background: var(--chat-bg); + background: #f5f7fa; overflow: hidden; height: 100%; - position: relative; -} - -.chat-container::before { - content: ''; - position: absolute; - inset: 0; - background-image: radial-gradient(circle at 20% 30%, rgba(0, 102, 255, 0.03) 0%, transparent 50%), - radial-gradient(circle at 80% 70%, rgba(0, 102, 255, 0.02) 0%, transparent 40%); - pointer-events: none; } /* 会话顶部栏样式 */ @@ -1052,46 +1026,26 @@ header { flex: 1; overflow-y: auto; overflow-x: hidden; - padding: 28px 24px 32px; - background: transparent; + padding: 24px; + background: #f5f7fa; display: flex; flex-direction: column; min-height: 0; - position: relative; - z-index: 1; -} - -.chat-messages::-webkit-scrollbar { - width: 8px; -} - -.chat-messages::-webkit-scrollbar-track { - background: transparent; - border-radius: 4px; -} - -.chat-messages::-webkit-scrollbar-thumb { - background: rgba(0, 0, 0, 0.12); - border-radius: 4px; -} - -.chat-messages::-webkit-scrollbar-thumb:hover { - background: rgba(0, 0, 0, 0.2); } .message { - margin-bottom: 26px; + margin-bottom: 24px; display: flex; align-items: flex-start; - gap: 14px; - animation: messageFadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1); + gap: 12px; + animation: fadeIn 0.3s ease-in; width: 100%; } -@keyframes messageFadeIn { +@keyframes fadeIn { from { opacity: 0; - transform: translateY(12px); + transform: translateY(10px); } to { opacity: 1; @@ -1110,31 +1064,24 @@ header { } .message-avatar { - width: 36px; - height: 36px; - border-radius: 10px; + width: 32px; + height: 32px; + border-radius: 6px; display: flex; align-items: center; justify-content: center; - font-size: 0.8125rem; + font-size: 0.75rem; font-weight: 600; flex-shrink: 0; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); - transition: transform 0.2s ease, box-shadow 0.2s ease; -} - -.message:hover .message-avatar { - box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08); } .message.user .message-avatar { - background: var(--chat-bubble-user); + background: var(--accent-color); color: white; - border: none; } .message.assistant .message-avatar { - background: var(--chat-bubble-assistant); + background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border-color); } @@ -1172,22 +1119,17 @@ header { } .message-bubble { - padding: 14px 18px; - border-radius: 14px; + padding: 12px 16px; + border-radius: 8px; word-wrap: break-word; word-break: break-word; - line-height: 1.62; - box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04); + line-height: 1.6; + box-shadow: var(--shadow-sm); overflow-x: auto; overflow-y: visible; max-width: 100%; -webkit-overflow-scrolling: touch; position: relative; - transition: box-shadow 0.2s ease; -} - -.message-bubble:hover { - box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05); } /* Markdown 样式 */ @@ -1508,24 +1450,18 @@ header { } .message.user .message-bubble { - background: var(--chat-bubble-user); + background: var(--accent-color); color: white; - border: none; - border-top-right-radius: 6px; - border-bottom-right-radius: 14px; - box-shadow: 0 2px 12px rgba(0, 102, 255, 0.25), 0 1px 3px rgba(0, 0, 0, 0.08); -} - -.message.user .message-bubble:hover { - box-shadow: 0 4px 18px rgba(0, 102, 255, 0.3), 0 2px 6px rgba(0, 0, 0, 0.1); + border-bottom-right-radius: 8px; + border-top-right-radius: 2px; } .message.assistant .message-bubble { - background: var(--chat-bubble-assistant); + background: var(--bg-primary); color: var(--text-primary); - border: 1px solid rgba(0, 0, 0, 0.06); - border-top-left-radius: 6px; - border-bottom-left-radius: 14px; + border: 1px solid var(--border-color); + border-bottom-left-radius: 8px; + border-top-left-radius: 2px; } .message.assistant .message-bubble pre { @@ -1536,80 +1472,70 @@ header { } .message.system .message-bubble { - background: rgba(255, 255, 255, 0.85); + background: var(--bg-tertiary); color: var(--text-secondary); border: 1px solid var(--border-color); - text-align: center; + text-align: left; font-size: 0.875rem; - padding: 12px 20px; + padding: 10px 16px; width: 100%; - border-radius: 12px; - backdrop-filter: blur(6px); } .message-time { font-size: 0.6875rem; color: var(--text-muted); - margin-top: 6px; + margin-top: 4px; padding: 0 2px; font-weight: 400; - letter-spacing: 0.02em; } /* MCP调用区域 */ .mcp-call-section { - margin-top: 14px; - padding-top: 14px; - border-top: 1px solid rgba(0, 0, 0, 0.06); + margin-top: 12px; + padding-top: 12px; + border-top: 1px solid var(--border-color); width: 100%; } .mcp-call-label { font-size: 0.75rem; color: var(--text-secondary); - margin-bottom: 10px; + margin-bottom: 8px; display: flex; align-items: center; - gap: 8px; - font-weight: 600; - letter-spacing: 0.02em; + gap: 6px; + font-weight: 500; } .mcp-call-label::before { content: ''; - width: 5px; - height: 5px; + width: 4px; + height: 4px; background: var(--accent-color); border-radius: 50%; display: inline-block; flex-shrink: 0; - box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.2); } .mcp-call-buttons { display: flex; flex-wrap: wrap; - gap: 8px; + gap: 6px; } .process-detail-btn { - background: rgba(156, 39, 176, 0.12) !important; - border-color: rgba(156, 39, 176, 0.35) !important; - color: #7b1fa2 !important; + background: rgba(156, 39, 176, 0.1) !important; + border-color: rgba(156, 39, 176, 0.3) !important; + color: #9c27b0 !important; display: inline-flex; align-items: center; gap: 6px; - border-radius: 10px !important; - padding: 8px 14px !important; - font-weight: 500 !important; - transition: all 0.2s ease !important; } .process-detail-btn:hover { - background: rgba(156, 39, 176, 0.22) !important; + background: rgba(156, 39, 176, 0.2) !important; border-color: #9c27b0 !important; - color: #6a1b9a !important; - box-shadow: 0 2px 10px rgba(156, 39, 176, 0.25) !important; + color: #7b1fa2 !important; } .process-detail-btn span { @@ -1646,18 +1572,14 @@ header { .chat-input-container { display: flex; flex-direction: row; - gap: 10px; + gap: 8px; align-items: flex-end; - padding: 16px 20px 20px; - background: rgba(255, 255, 255, 0.92); + padding: 12px 16px; + background: var(--bg-primary); border-top: 1px solid rgba(0, 0, 0, 0.06); flex-shrink: 0; width: 100%; box-sizing: border-box; - backdrop-filter: blur(10px); - position: relative; - z-index: 2; - box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.04); } .chat-input-container > .chat-input-field { @@ -1679,26 +1601,26 @@ header { .chat-input-container textarea { flex: 1; min-width: 0; - padding: 12px 16px; - border: 1px solid rgba(0, 0, 0, 0.08); - border-radius: 14px; + padding: 10px 14px; + border: 1px solid rgba(0, 0, 0, 0.1); + border-radius: 12px; font-size: 0.9375rem; outline: none; - transition: border-color 0.2s ease, box-shadow 0.2s ease; + transition: all 0.2s; background: #ffffff; color: var(--text-primary); resize: none; - height: 44px; - min-height: 44px; - max-height: 140px; + height: 40px; + min-height: 40px; + max-height: 120px; font-family: inherit; - line-height: 1.45; + line-height: 1.4; overflow-y: auto; box-sizing: border-box; vertical-align: middle; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); - scrollbar-width: thin; - scrollbar-color: transparent transparent; + /* 隐藏滚动条但保留滚动功能 */ + scrollbar-width: thin; /* Firefox */ + scrollbar-color: transparent transparent; /* Firefox - 隐藏滚动条 */ } /* WebKit 浏览器(Chrome, Safari, Edge)的滚动条样式 - 隐藏但保留功能 */ @@ -1726,7 +1648,7 @@ header { .chat-input-container textarea:focus { border-color: var(--accent-color); - box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.12); + box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.08); background: #ffffff; } @@ -1739,22 +1661,22 @@ header { align-items: center; justify-content: center; gap: 6px; - padding: 10px 22px; - height: 44px; + padding: 10px 20px; + height: 40px; background: linear-gradient(135deg, var(--accent-color) 0%, #0052cc 100%); color: white; border: none; - border-radius: 14px; + border-radius: 12px; cursor: pointer; font-size: 0.9375rem; font-weight: 600; - transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); white-space: nowrap; flex-shrink: 0; box-sizing: border-box; position: relative; overflow: hidden; - box-shadow: 0 3px 12px rgba(0, 102, 255, 0.28), 0 1px 4px rgba(0, 0, 0, 0.08); + box-shadow: 0 2px 8px rgba(0, 102, 255, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1); } /* 按钮光效动画 */ @@ -1982,11 +1904,11 @@ header { display: inline-flex; align-items: center; gap: 6px; - padding: 8px 14px; - background: rgba(0, 102, 255, 0.08); + padding: 6px 12px; + background: var(--bg-primary); color: var(--accent-color); - border: 1px solid rgba(0, 102, 255, 0.2); - border-radius: 10px; + border: 1px solid var(--border-color); + border-radius: 6px; font-size: 0.8125rem; font-weight: 500; cursor: pointer; @@ -1998,7 +1920,7 @@ header { color: white; border-color: var(--accent-color); transform: translateY(-1px); - box-shadow: 0 3px 10px rgba(0, 102, 255, 0.3); + box-shadow: var(--shadow-sm); } .mcp-detail-btn:active { @@ -2009,66 +1931,37 @@ header { .login-overlay { position: fixed; inset: 0; - background: rgba(0, 0, 0, 0.5); - backdrop-filter: blur(12px); - -webkit-backdrop-filter: blur(12px); + background: rgba(0, 0, 0, 0.6); + backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; z-index: 1200; padding: 24px; - animation: loginOverlayIn 0.3s ease-out; -} - -@keyframes loginOverlayIn { - from { opacity: 0; } - to { opacity: 1; } -} - -@keyframes loginCardIn { - from { - opacity: 0; - transform: scale(0.96) translateY(-12px); - } - to { - opacity: 1; - transform: scale(1) translateY(0); - } } .login-card { width: 100%; - max-width: 400px; + max-width: 360px; background: var(--bg-primary); - border-radius: 16px; - padding: 0; - box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04); + border-radius: 12px; + padding: 32px 28px; + box-shadow: var(--shadow-lg); border: 1px solid var(--border-color); display: flex; flex-direction: column; - gap: 0; - overflow: hidden; - animation: loginCardIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); + gap: 20px; } -.login-brand { - padding: 32px 28px 24px; - text-align: center; - background: linear-gradient(180deg, rgba(0, 102, 255, 0.06) 0%, transparent 100%); - border-bottom: 1px solid var(--border-color); -} - -.login-brand h2 { +.login-header h2 { margin: 0; - font-size: 1.375rem; - font-weight: 600; + font-size: 1.5rem; color: var(--text-primary); - letter-spacing: -0.02em; } .login-subtitle { margin: 8px 0 0 0; - font-size: 0.875rem; + font-size: 0.9375rem; color: var(--text-secondary); } @@ -2076,85 +1969,23 @@ header { display: flex; flex-direction: column; gap: 16px; - padding: 24px 28px 28px; -} - -.login-form .form-group { - margin-bottom: 0; -} - -.login-form .form-group label { - display: block; - margin-bottom: 8px; - font-size: 0.8125rem; - font-weight: 500; - color: var(--text-secondary); -} - -.login-form input[type="password"] { - width: 100%; - padding: 12px 14px; - font-size: 0.9375rem; - border: 1px solid var(--border-color); - border-radius: 10px; - background: var(--bg-primary); - color: var(--text-primary); - transition: border-color 0.2s, box-shadow 0.2s; -} - -.login-form input[type="password"]::placeholder { - color: var(--text-muted); -} - -.login-form input[type="password"]:focus { - outline: none; - border-color: var(--accent-color); - box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15); } .login-error { color: var(--error-color); background: rgba(220, 53, 69, 0.08); - border: 1px solid rgba(220, 53, 69, 0.3); - border-radius: 8px; + border: 1px solid rgba(220, 53, 69, 0.4); + border-radius: 6px; padding: 10px 12px; - font-size: 0.8125rem; + font-size: 0.875rem; } -.login-card .login-submit { +.login-submit { width: 100%; justify-content: center; display: inline-flex; align-items: center; gap: 8px; - padding: 12px 20px; - font-size: 0.9375rem; - font-weight: 600; - border-radius: 10px; - background: linear-gradient(135deg, var(--accent-color) 0%, #0047ab 100%) !important; - border: none !important; - color: #fff !important; - box-shadow: 0 4px 14px rgba(0, 102, 255, 0.4); - transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s; -} - -.login-card .login-submit:hover { - box-shadow: 0 6px 20px rgba(0, 102, 255, 0.45); - transform: translateY(-1px); - background: linear-gradient(135deg, var(--accent-hover) 0%, #003d8a 100%) !important; -} - -.login-card .login-submit:active { - transform: translateY(0); - box-shadow: 0 2px 10px rgba(0, 102, 255, 0.35); -} - -.login-submit-arrow { - transition: transform 0.2s ease; -} - -.login-card .login-submit:hover .login-submit-arrow { - transform: translateX(3px); } /* 模态框样式 */ @@ -2594,7 +2425,7 @@ header { align-items: center; margin-bottom: 12px; padding-bottom: 12px; - border-bottom: 1px solid rgba(0, 0, 0, 0.06); + border-bottom: 1px solid var(--border-color); } .progress-actions { @@ -2631,21 +2462,19 @@ header { } .progress-toggle { - padding: 6px 14px; + padding: 4px 12px; background: var(--bg-tertiary); border: 1px solid var(--border-color); - border-radius: 8px; + border-radius: 4px; font-size: 0.8125rem; - font-weight: 500; color: var(--text-secondary); cursor: pointer; - transition: all 0.2s ease; + transition: all 0.2s; } .progress-toggle:hover { background: var(--bg-secondary); color: var(--text-primary); - border-color: rgba(0, 0, 0, 0.12); } .progress-timeline { @@ -2660,13 +2489,13 @@ header { } .timeline-item { - padding: 12px 14px; - margin-bottom: 10px; - border-left: 4px solid var(--border-color); + padding: 12px; + margin-bottom: 8px; + border-left: 3px solid var(--border-color); padding-left: 16px; background: var(--bg-secondary); - border-radius: 8px; - transition: all 0.2s ease; + border-radius: 4px; + transition: all 0.2s; } .timeline-item:hover { @@ -8769,8 +8598,6 @@ header { } .dashboard-tools-chart-wrap { - display: flex; - flex-direction: column; min-width: 0; flex: 1; } @@ -8780,7 +8607,6 @@ header { align-items: center; justify-content: center; min-height: 120px; - flex: 1; font-size: 0.8125rem; color: var(--text-muted); background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); @@ -9397,16 +9223,15 @@ header { display: flex; align-items: center; gap: 6px; - padding: 10px 14px; - height: 44px; + padding: 10px 12px; + height: 40px; background: #ffffff; - border: 1px solid rgba(0, 0, 0, 0.08); - border-radius: 14px; + border: 1px solid rgba(0, 0, 0, 0.1); + border-radius: 12px; color: var(--text-primary); cursor: pointer; - transition: all 0.2s ease; + transition: all 0.2s; flex-shrink: 0; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); font-size: 0.9375rem; font-weight: 500; white-space: nowrap; diff --git a/web/static/js/dashboard.js b/web/static/js/dashboard.js index edf17fb1..8e70968c 100644 --- a/web/static/js/dashboard.js +++ b/web/static/js/dashboard.js @@ -17,7 +17,7 @@ async function refreshDashboard() { setEl('dashboard-kpi-tools-calls', '…'); setEl('dashboard-kpi-success-rate', '…'); var chartPlaceholder = document.getElementById('dashboard-tools-pie-placeholder'); - if (chartPlaceholder) { chartPlaceholder.style.removeProperty('display'); chartPlaceholder.textContent = '加载中…'; } + if (chartPlaceholder) { chartPlaceholder.style.display = 'block'; chartPlaceholder.textContent = '加载中…'; } var barChartEl = document.getElementById('dashboard-tools-bar-chart'); if (barChartEl) { barChartEl.style.display = 'none'; barChartEl.innerHTML = ''; } @@ -134,31 +134,19 @@ async function refreshDashboard() { // 知识:{ enabled, total_categories, total_items, ... }(优化版) const knowledgeItemsEl = document.getElementById('dashboard-knowledge-items'); const knowledgeCategoriesEl = document.getElementById('dashboard-knowledge-categories'); - const knowledgeStatusEl = document.getElementById('dashboard-knowledge-status'); if (knowledgeRes && typeof knowledgeRes === 'object') { if (knowledgeRes.enabled === false) { - // 功能未启用:用状态标签展示,数值保持为 "-" - if (knowledgeStatusEl) knowledgeStatusEl.textContent = '未启用'; - if (knowledgeItemsEl) knowledgeItemsEl.textContent = '-'; + if (knowledgeItemsEl) knowledgeItemsEl.textContent = '未启用'; if (knowledgeCategoriesEl) knowledgeCategoriesEl.textContent = '-'; } else { const categories = knowledgeRes.total_categories ?? 0; const items = knowledgeRes.total_items ?? 0; if (knowledgeItemsEl) knowledgeItemsEl.textContent = formatNumber(items); if (knowledgeCategoriesEl) knowledgeCategoriesEl.textContent = formatNumber(categories); - // 根据数据量给个轻量状态文案 - if (knowledgeStatusEl) { - if (items > 0 || categories > 0) { - knowledgeStatusEl.textContent = '已启用'; - } else { - knowledgeStatusEl.textContent = '待配置'; - } - } } } else { if (knowledgeItemsEl) knowledgeItemsEl.textContent = '-'; if (knowledgeCategoriesEl) knowledgeCategoriesEl.textContent = '-'; - if (knowledgeStatusEl) knowledgeStatusEl.textContent = '-'; } // Skills:{ total_skills, total_calls, ... }(优化版) @@ -200,7 +188,7 @@ async function refreshDashboard() { setEl('dashboard-kpi-tools-calls', '-'); renderDashboardToolsBar(null); var ph = document.getElementById('dashboard-tools-pie-placeholder'); - if (ph) { ph.style.removeProperty('display'); ph.textContent = '暂无调用数据'; } + if (ph) { ph.style.display = 'block'; ph.textContent = '暂无调用数据'; } } } @@ -213,7 +201,7 @@ function setDashboardOverviewPlaceholder(t) { ['dashboard-batch-pending', 'dashboard-batch-running', 'dashboard-batch-done', 'dashboard-batch-total', 'dashboard-tools-count', 'dashboard-tools-calls', 'dashboard-tools-success-rate', 'dashboard-skills-count', 'dashboard-skills-calls', 'dashboard-skills-status', - 'dashboard-knowledge-items', 'dashboard-knowledge-categories', 'dashboard-knowledge-status'].forEach(id => setEl(id, t)); + 'dashboard-knowledge-items', 'dashboard-knowledge-categories'].forEach(id => setEl(id, t)); updateProgressBar('dashboard-batch-progress-pending', '0'); updateProgressBar('dashboard-batch-progress-running', '0'); updateProgressBar('dashboard-batch-progress-done', '0'); @@ -256,8 +244,7 @@ function renderDashboardToolsBar(monitorRes) { if (!placeholder || !barChartEl) return; if (!monitorRes || typeof monitorRes !== 'object') { - placeholder.style.removeProperty('display'); - placeholder.textContent = '暂无调用数据'; + placeholder.style.display = 'block'; barChartEl.style.display = 'none'; barChartEl.innerHTML = ''; return; @@ -272,8 +259,7 @@ function renderDashboardToolsBar(monitorRes) { .slice(0, 30); if (entries.length === 0) { - placeholder.style.removeProperty('display'); - placeholder.textContent = '暂无调用数据'; + placeholder.style.display = 'block'; barChartEl.style.display = 'none'; barChartEl.innerHTML = ''; return; diff --git a/web/templates/index.html b/web/templates/index.html index 753b43e6..c9eb526c 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -11,7 +11,7 @@
@@ -304,7 +299,6 @@