From 8579d58890baeee846c81af65e18c0da599af018 Mon Sep 17 00:00:00 2001
From: hubian <908234780@qq.com>
Date: Thu, 23 Apr 2026 16:56:57 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E7=AD=9B=E9=80=89=E6=8C=89=E9=92=AE?=
=?UTF-8?q?=E6=94=B9=E4=B8=BA=E9=A1=B6=E9=83=A8=E6=A8=AA=E5=90=91=E5=B8=A6?=
=?UTF-8?q?=E6=96=87=E5=AD=97=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.py | 40 +++++++++++++++----------------------
logs/app.log | 56 +++++++++++++++++++++++++++-------------------------
2 files changed, 45 insertions(+), 51 deletions(-)
diff --git a/app.py b/app.py
index 3f6c356..a923af0 100644
--- a/app.py
+++ b/app.py
@@ -935,7 +935,7 @@ HTML_TEMPLATE = '''
- 项目服务管理面板 v2.3
+ 项目服务管理面板 v2.4
@@ -959,17 +959,12 @@ HTML_TEMPLATE = '''
.nav-btn:hover { background: #475569; transform: scale(1.1); }
.nav-btn i { font-size: 20px; color: #94a3b8; }
.nav-btn:hover i { color: #f1f5f9; }
- .filter-nav { position: fixed; right: 20px; top: 120px; z-index: 100; display: flex; flex-direction: column; gap: 6px; }
- .filter-nav-btn { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; background: #1e293b; border: 1px solid #334155; }
- .filter-nav-btn:hover { background: #334155; transform: scale(1.1); }
- .filter-nav-btn i { font-size: 18px; color: #94a3b8; }
- .filter-nav-btn:hover i { color: #f1f5f9; }
- .filter-nav-btn.active { background: #3b82f6; border-color: #3b82f6; }
- .filter-nav-btn.active i { color: #fff; }
- .filter-nav-btn.add-btn { background: #22c55e; border-color: #22c55e; }
- .filter-nav-btn.add-btn i { color: #fff; }
- .filter-nav-btn.add-btn:hover { background: #16a34a; }
- .filter-nav-divider { height: 1px; background: #475569; margin: 4px 8px; }
+ .filter-bar { position: sticky; top: 0; z-index: 50; display: flex; gap: 8px; padding: 12px 0; background: #0f172a; margin-bottom: 16px; flex-wrap: wrap; }
+ .filter-bar-btn { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; background: #1e293b; border: 1px solid #334155; color: #94a3b8; font-size: 14px; cursor: pointer; transition: all 0.2s; }
+ .filter-bar-btn:hover { background: #334155; color: #f1f5f9; }
+ .filter-bar-btn.active { background: #3b82f6; border-color: #3b82f6; color: #fff; }
+ .filter-bar-btn.add-btn { background: #22c55e; border-color: #22c55e; color: #fff; }
+ .filter-bar-btn.add-btn:hover { background: #16a34a; }
.tab-btn { border-bottom: 2px solid transparent; }
.tab-btn.active { border-bottom-color: #3b82f6; }
.cron-card { transition: all 0.2s; }
@@ -1068,15 +1063,14 @@ HTML_TEMPLATE = '''
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -1391,7 +1385,7 @@ HTML_TEMPLATE = '''
function filterType(type) {
currentFilter = type;
- document.querySelectorAll('.filter-nav-btn').forEach(btn => {
+ document.querySelectorAll('.filter-bar-btn').forEach(btn => {
btn.classList.toggle('active', btn.dataset.type === type);
});
renderProjects();
@@ -2136,8 +2130,6 @@ HTML_TEMPLATE = '''
// 初始化
loadProjects();
- // 默认选中"全部"筛选按钮
- document.querySelector('.filter-nav-btn[data-type="all"]')?.classList.add('active');
let refreshIntervalMs = parseInt(localStorage.getItem('refreshInterval') || '30') * 1000;
document.getElementById('refreshInterval').value = refreshIntervalMs / 1000;
diff --git a/logs/app.log b/logs/app.log
index c8a1cb8..eee7ca4 100644
--- a/logs/app.log
+++ b/logs/app.log
@@ -1,8 +1,8 @@
-[2026-04-23 16:51:46] ==================================================
-[2026-04-23 16:51:46] 项目服务管理面板 v2.0.0 启动
-[2026-04-23 16:51:46] 访问地址: http://localhost:19013
-[2026-04-23 16:51:46] 进程PID: 1116498
-[2026-04-23 16:51:46] ==================================================
+[2026-04-23 16:56:14] ==================================================
+[2026-04-23 16:56:14] 项目服务管理面板 v2.0.0 启动
+[2026-04-23 16:56:14] 访问地址: http://localhost:19013
+[2026-04-23 16:56:14] 进程PID: 1118301
+[2026-04-23 16:56:14] ==================================================
* Serving Flask app 'app'
* Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
@@ -10,25 +10,27 @@ WARNING: This is a development server. Do not use it in a production deployment.
* Running on http://127.0.0.1:19013
* Running on http://192.168.2.17:19013
Press CTRL+C to quit
-192.168.2.14 - - [23/Apr/2026 16:51:46] "GET / HTTP/1.1" 200 -
-127.0.0.1 - - [23/Apr/2026 16:51:47] "GET / HTTP/1.1" 200 -
-127.0.0.1 - - [23/Apr/2026 16:51:48] "GET / HTTP/1.1" 200 -
-127.0.0.1 - - [23/Apr/2026 16:51:48] "GET / HTTP/1.1" 200 -
-192.168.2.14 - - [23/Apr/2026 16:51:49] "GET /api/projects HTTP/1.1" 200 -
-192.168.2.8 - - [23/Apr/2026 16:51:49] "GET /api/projects HTTP/1.1" 200 -
-127.0.0.1 - - [23/Apr/2026 16:51:57] "GET / HTTP/1.1" 200 -
-127.0.0.1 - - [23/Apr/2026 16:51:58] "GET / HTTP/1.1" 200 -
-192.168.2.14 - - [23/Apr/2026 16:51:59] "GET /api/projects HTTP/1.1" 200 -
-192.168.2.8 - - [23/Apr/2026 16:51:59] "GET /api/projects HTTP/1.1" 200 -
-127.0.0.1 - - [23/Apr/2026 16:52:06] "GET / HTTP/1.1" 200 -
-192.168.2.8 - - [23/Apr/2026 16:52:07] "GET /api/projects HTTP/1.1" 200 -
-127.0.0.1 - - [23/Apr/2026 16:52:07] "GET / HTTP/1.1" 200 -
-127.0.0.1 - - [23/Apr/2026 16:52:08] "GET / HTTP/1.1" 200 -
-192.168.2.14 - - [23/Apr/2026 16:52:09] "GET /api/projects HTTP/1.1" 200 -
-192.168.2.8 - - [23/Apr/2026 16:52:09] "GET /api/projects HTTP/1.1" 200 -
-127.0.0.1 - - [23/Apr/2026 16:52:17] "GET / HTTP/1.1" 200 -
-127.0.0.1 - - [23/Apr/2026 16:52:18] "GET / HTTP/1.1" 200 -
-192.168.2.14 - - [23/Apr/2026 16:52:19] "GET /api/projects HTTP/1.1" 200 -
-192.168.2.8 - - [23/Apr/2026 16:52:19] "GET /api/projects HTTP/1.1" 200 -
-127.0.0.1 - - [23/Apr/2026 16:52:20] "GET / HTTP/1.1" 200 -
-192.168.2.14 - - [23/Apr/2026 16:52:22] "GET /api/projects HTTP/1.1" 200 -
+127.0.0.1 - - [23/Apr/2026 16:56:17] "GET / HTTP/1.1" 200 -
+127.0.0.1 - - [23/Apr/2026 16:56:17] "GET / HTTP/1.1" 200 -
+127.0.0.1 - - [23/Apr/2026 16:56:18] "GET / HTTP/1.1" 200 -
+192.168.2.14 - - [23/Apr/2026 16:56:19] "GET /api/projects HTTP/1.1" 200 -
+192.168.2.8 - - [23/Apr/2026 16:56:20] "GET /api/projects HTTP/1.1" 200 -
+127.0.0.1 - - [23/Apr/2026 16:56:21] "GET / HTTP/1.1" 200 -
+192.168.2.14 - - [23/Apr/2026 16:56:22] "GET /api/projects HTTP/1.1" 200 -
+127.0.0.1 - - [23/Apr/2026 16:56:27] "GET / HTTP/1.1" 200 -
+127.0.0.1 - - [23/Apr/2026 16:56:28] "GET / HTTP/1.1" 200 -
+192.168.2.14 - - [23/Apr/2026 16:56:29] "GET /api/projects HTTP/1.1" 200 -
+192.168.2.8 - - [23/Apr/2026 16:56:30] "GET /api/projects HTTP/1.1" 200 -
+127.0.0.1 - - [23/Apr/2026 16:56:36] "GET / HTTP/1.1" 200 -
+127.0.0.1 - - [23/Apr/2026 16:56:37] "GET / HTTP/1.1" 200 -
+192.168.2.8 - - [23/Apr/2026 16:56:38] "GET /api/projects HTTP/1.1" 200 -
+127.0.0.1 - - [23/Apr/2026 16:56:38] "GET / HTTP/1.1" 200 -
+192.168.2.14 - - [23/Apr/2026 16:56:39] "GET /api/projects HTTP/1.1" 200 -
+192.168.2.8 - - [23/Apr/2026 16:56:40] "GET /api/projects HTTP/1.1" 200 -
+127.0.0.1 - - [23/Apr/2026 16:56:47] "GET / HTTP/1.1" 200 -
+127.0.0.1 - - [23/Apr/2026 16:56:48] "GET / HTTP/1.1" 200 -
+192.168.2.14 - - [23/Apr/2026 16:56:49] "GET /api/projects HTTP/1.1" 200 -
+192.168.2.8 - - [23/Apr/2026 16:56:50] "GET /api/projects HTTP/1.1" 200 -
+127.0.0.1 - - [23/Apr/2026 16:56:50] "GET / HTTP/1.1" 200 -
+192.168.2.14 - - [23/Apr/2026 16:56:52] "GET /api/projects HTTP/1.1" 200 -
+127.0.0.1 - - [23/Apr/2026 16:56:57] "GET / HTTP/1.1" 200 -