From 55cc408881594d0322c38a1d8b803825f2a439a9 Mon Sep 17 00:00:00 2001 From: hubian <908234780@qq.com> Date: Thu, 23 Apr 2026 17:48:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=B3=BB=E7=BB=9F=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E9=98=88=E5=80=BC=E7=9B=91=E6=8E=A7=E5=92=8C=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 149 ++++++++++++++++++++++++++++++++++++++++++++++++++- logs/app.log | 36 +++++++++---- 2 files changed, 174 insertions(+), 11 deletions(-) diff --git a/app.py b/app.py index 3b3b6b4..0673829 100644 --- a/app.py +++ b/app.py @@ -1040,7 +1040,7 @@ HTML_TEMPLATE = ''' - 项目服务管理面板 v2.7 + 项目服务管理面板 v2.8 @@ -1075,6 +1075,21 @@ HTML_TEMPLATE = ''' .speed-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 6px; background: #334155; font-size: 13px; } .speed-badge.upload { color: #f97316; } .speed-badge.download { color: #3b82f6; } + .threshold-section { background: #1e293b; border: 1px solid #334155; border-radius: 12px; padding: 16px; margin-bottom: 16px; } + .threshold-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #334155; } + .threshold-item:last-child { border-bottom: none; } + .threshold-label { flex: 1; display: flex; align-items: center; gap: 8px; } + .threshold-input { width: 60px; background: #334155; border: 1px solid #475569; border-radius: 6px; padding: 4px 8px; color: #f1f5f9; text-align: center; } + .threshold-input:focus { outline: none; border-color: #3b82f6; } + .threshold-icon { font-size: 18px; } + .threshold-warning { color: #f97316; } + .alert-popup { position: fixed; top: 20px; right: 20px; z-index: 1000; background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); border-radius: 12px; padding: 16px 20px; color: white; box-shadow: 0 10px 40px rgba(0,0,0,0.3); animation: slideIn 0.3s ease-out; max-width: 320px; } + .alert-popup .alert-title { font-weight: bold; font-size: 16px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; } + .alert-popup .alert-content { font-size: 14px; } + .alert-popup .alert-close { position: absolute; top: 8px; right: 12px; cursor: pointer; opacity: 0.7; } + .alert-popup .alert-close:hover { opacity: 1; } + @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } } + @keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } } .tab-btn { border-bottom: 2px solid transparent; } .tab-btn.active { border-bottom-color: #3b82f6; } .cron-card { transition: all 0.2s; } @@ -1294,6 +1309,56 @@ HTML_TEMPLATE = ''' + +
+
+

+ 监控阈值设置 +

+ 超过阈值将弹窗警告 +
+
+
+ + CPU 使用率 +
+
+ + % +
+
+
+
+ + 内存使用率 +
+
+ + % +
+
+
+
+ + 磁盘使用率 +
+
+ + % +
+
+
+
+ + 警告间隔 +
+
+ + +
+
+
+