Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8579d58890 | |||
| f8a32ab6be | |||
| 56975f9b0d | |||
| b2900febf9 |
30
app.py
30
app.py
@@ -935,7 +935,7 @@ HTML_TEMPLATE = '''<!DOCTYPE html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>项目服务管理面板 v2.1</title>
|
||||
<title>项目服务管理面板 v2.4</title>
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>📊</text></svg>">
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/remixicon@3.5.0/fonts/remixicon.css" rel="stylesheet">
|
||||
@@ -959,6 +959,12 @@ HTML_TEMPLATE = '''<!DOCTYPE html>
|
||||
.nav-btn:hover { background: #475569; transform: scale(1.1); }
|
||||
.nav-btn i { font-size: 20px; color: #94a3b8; }
|
||||
.nav-btn:hover i { color: #f1f5f9; }
|
||||
.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; }
|
||||
@@ -1057,15 +1063,14 @@ HTML_TEMPLATE = '''<!DOCTYPE html>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 筛选器 -->
|
||||
<div class="flex gap-2 mb-4 flex-wrap">
|
||||
<button onclick="filterType('all')" class="filter-btn px-3 py-1 rounded-lg bg-gray-700 hover:bg-gray-600 text-sm" data-type="all">全部</button>
|
||||
<button onclick="filterType('web')" class="filter-btn px-3 py-1 rounded-lg bg-gray-700 hover:bg-gray-600 text-sm" data-type="web">Web服务</button>
|
||||
<button onclick="filterType('cli')" class="filter-btn px-3 py-1 rounded-lg bg-gray-700 hover:bg-gray-600 text-sm" data-type="cli">CLI工具</button>
|
||||
<button onclick="filterType('extension')" class="filter-btn px-3 py-1 rounded-lg bg-gray-700 hover:bg-gray-600 text-sm" data-type="extension">插件</button>
|
||||
<button onclick="showAddServiceModal()" class="btn bg-green-600 hover:bg-green-700 px-3 py-1 rounded-lg text-sm flex items-center gap-1 ml-2">
|
||||
<i class="ri-add-circle-line"></i> 新增服务
|
||||
</button>
|
||||
<!-- 筛选器(顶部固定) -->
|
||||
<div class="filter-bar">
|
||||
<button onclick="filterType('all')" class="filter-bar-btn active" data-type="all"><i class="ri-apps-line"></i> 全部</button>
|
||||
<button onclick="filterType('web')" class="filter-bar-btn" data-type="web"><i class="ri-server-line"></i> Web服务</button>
|
||||
<button onclick="filterType('custom')" class="filter-bar-btn" data-type="custom"><i class="ri-global-line"></i> 自定义</button>
|
||||
<button onclick="filterType('cli')" class="filter-bar-btn" data-type="cli"><i class="ri-terminal-box-line"></i> CLI工具</button>
|
||||
<button onclick="filterType('extension')" class="filter-bar-btn" data-type="extension"><i class="ri-chrome-line"></i> 插件</button>
|
||||
<button onclick="showAddServiceModal()" class="filter-bar-btn add-btn"><i class="ri-add-circle-line"></i> 新增服务</button>
|
||||
</div>
|
||||
|
||||
<!-- 项目列表 -->
|
||||
@@ -1380,9 +1385,8 @@ HTML_TEMPLATE = '''<!DOCTYPE html>
|
||||
|
||||
function filterType(type) {
|
||||
currentFilter = type;
|
||||
document.querySelectorAll('.filter-btn').forEach(btn => {
|
||||
btn.classList.toggle('bg-blue-600', btn.dataset.type === type);
|
||||
btn.classList.toggle('bg-gray-700', btn.dataset.type !== type);
|
||||
document.querySelectorAll('.filter-bar-btn').forEach(btn => {
|
||||
btn.classList.toggle('active', btn.dataset.type === type);
|
||||
});
|
||||
renderProjects();
|
||||
}
|
||||
|
||||
52
logs/app.log
52
logs/app.log
@@ -1,8 +1,8 @@
|
||||
[2026-04-23 12:55:21] ==================================================
|
||||
[2026-04-23 12:55:21] 项目服务管理面板 v2.0.0 启动
|
||||
[2026-04-23 12:55:21] 访问地址: http://localhost:19013
|
||||
[2026-04-23 12:55:21] 进程PID: 1025030
|
||||
[2026-04-23 12:55:21] ==================================================
|
||||
[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,21 +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
|
||||
127.0.0.1 - - [23/Apr/2026 12:55:23] "GET / HTTP/1.1" 200 -
|
||||
127.0.0.1 - - [23/Apr/2026 12:55:24] "GET / HTTP/1.1" 200 -
|
||||
192.168.2.8 - - [23/Apr/2026 12:55:25] "GET /api/projects HTTP/1.1" 200 -
|
||||
127.0.0.1 - - [23/Apr/2026 12:55:28] "GET / HTTP/1.1" 200 -
|
||||
127.0.0.1 - - [23/Apr/2026 12:55:29] "GET / HTTP/1.1" 200 -
|
||||
192.168.2.14 - - [23/Apr/2026 12:55:30] "GET /api/projects HTTP/1.1" 200 -
|
||||
192.168.2.8 - - [23/Apr/2026 12:55:31] "GET /api/projects HTTP/1.1" 200 -
|
||||
127.0.0.1 - - [23/Apr/2026 12:55:32] "GET / HTTP/1.1" 200 -
|
||||
192.168.2.14 - - [23/Apr/2026 12:55:33] "GET /api/projects HTTP/1.1" 200 -
|
||||
127.0.0.1 - - [23/Apr/2026 12:55:38] "GET / HTTP/1.1" 200 -
|
||||
127.0.0.1 - - [23/Apr/2026 12:55:39] "GET / HTTP/1.1" 200 -
|
||||
192.168.2.14 - - [23/Apr/2026 12:55:40] "GET /api/projects HTTP/1.1" 200 -
|
||||
192.168.2.8 - - [23/Apr/2026 12:55:41] "GET /api/projects HTTP/1.1" 200 -
|
||||
127.0.0.1 - - [23/Apr/2026 12:55:48] "GET / HTTP/1.1" 200 -
|
||||
127.0.0.1 - - [23/Apr/2026 12:55:49] "GET / HTTP/1.1" 200 -
|
||||
192.168.2.14 - - [23/Apr/2026 12:55:50] "GET /api/projects HTTP/1.1" 200 -
|
||||
192.168.2.8 - - [23/Apr/2026 12:55:51] "GET /api/projects HTTP/1.1" 200 -
|
||||
127.0.0.1 - - [23/Apr/2026 12:55:54] "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: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 -
|
||||
|
||||
Reference in New Issue
Block a user