fix: JavaScript变量声明顺序修复
This commit is contained in:
BIN
__pycache__/app.cpython-310.pyc
Normal file
BIN
__pycache__/app.cpython-310.pyc
Normal file
Binary file not shown.
13
app.py
13
app.py
@@ -1645,6 +1645,13 @@ HTML_TEMPLATE = '''<!DOCTYPE html>
|
|||||||
document.getElementById('enableLogs').checked = enableLogs;
|
document.getElementById('enableLogs').checked = enableLogs;
|
||||||
|
|
||||||
// Tab 切换
|
// Tab 切换
|
||||||
|
// 系统资源监控变量(必须先声明)
|
||||||
|
let realtimeTimer = null;
|
||||||
|
let realtimeInterval = 2; // 秒
|
||||||
|
let lastAlertTime = 0; // 上次警告时间
|
||||||
|
let thresholds = { cpu: 80, memory: 85, disk: 90, interval: 60 };
|
||||||
|
let desktopNotifyEnabled = false;
|
||||||
|
|
||||||
function switchTab(tab) {
|
function switchTab(tab) {
|
||||||
currentTab = tab;
|
currentTab = tab;
|
||||||
document.querySelectorAll('.tab-btn').forEach(btn => {
|
document.querySelectorAll('.tab-btn').forEach(btn => {
|
||||||
@@ -1673,12 +1680,6 @@ HTML_TEMPLATE = '''<!DOCTYPE html>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 系统资源加载
|
|
||||||
let realtimeTimer = null;
|
|
||||||
let realtimeInterval = 2; // 秒
|
|
||||||
let lastAlertTime = 0; // 上次警告时间
|
|
||||||
let thresholds = { cpu: 80, memory: 85, disk: 90, interval: 60 };
|
|
||||||
|
|
||||||
// 加载阈值设置
|
// 加载阈值设置
|
||||||
function loadThresholds() {
|
function loadThresholds() {
|
||||||
const saved = localStorage.getItem('systemThresholds');
|
const saved = localStorage.getItem('systemThresholds');
|
||||||
|
|||||||
51
logs/app.log
51
logs/app.log
@@ -1,8 +1,8 @@
|
|||||||
[2026-04-23 17:53:14] ==================================================
|
[2026-04-23 18:07:56] ==================================================
|
||||||
[2026-04-23 17:53:14] 项目服务管理面板 v2.0.0 启动
|
[2026-04-23 18:07:56] 项目服务管理面板 v2.0.0 启动
|
||||||
[2026-04-23 17:53:14] 访问地址: http://localhost:19013
|
[2026-04-23 18:07:56] 访问地址: http://localhost:19013
|
||||||
[2026-04-23 17:53:14] 进程PID: 1140936
|
[2026-04-23 18:07:56] 进程PID: 1146360
|
||||||
[2026-04-23 17:53:14] ==================================================
|
[2026-04-23 18:07:56] ==================================================
|
||||||
* Serving Flask app 'app'
|
* Serving Flask app 'app'
|
||||||
* Debug mode: off
|
* Debug mode: off
|
||||||
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
|
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
|
||||||
@@ -10,25 +10,22 @@ 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://127.0.0.1:19013
|
||||||
* Running on http://192.168.2.17:19013
|
* Running on http://192.168.2.17:19013
|
||||||
Press CTRL+C to quit
|
Press CTRL+C to quit
|
||||||
127.0.0.1 - - [23/Apr/2026 17:53:19] "GET / HTTP/1.1" 200 -
|
127.0.0.1 - - [23/Apr/2026 18:07:58] "GET / HTTP/1.1" 200 -
|
||||||
127.0.0.1 - - [23/Apr/2026 17:53:23] "GET / HTTP/1.1" 200 -
|
192.168.2.8 - - [23/Apr/2026 18:08:00] "GET /api/projects HTTP/1.1" 200 -
|
||||||
192.168.2.14 - - [23/Apr/2026 17:53:25] "GET /api/projects HTTP/1.1" 200 -
|
127.0.0.1 - - [23/Apr/2026 18:08:00] "GET / HTTP/1.1" 200 -
|
||||||
127.0.0.1 - - [23/Apr/2026 17:53:26] "GET / HTTP/1.1" 200 -
|
127.0.0.1 - - [23/Apr/2026 18:08:08] "GET / HTTP/1.1" 200 -
|
||||||
192.168.2.8 - - [23/Apr/2026 17:53:27] "GET /api/projects HTTP/1.1" 200 -
|
192.168.2.8 - - [23/Apr/2026 18:08:10] "GET /api/projects HTTP/1.1" 200 -
|
||||||
127.0.0.1 - - [23/Apr/2026 17:53:34] "GET / HTTP/1.1" 200 -
|
127.0.0.1 - - [23/Apr/2026 18:08:16] "GET / HTTP/1.1" 200 -
|
||||||
192.168.2.14 - - [23/Apr/2026 17:53:36] "GET /api/projects HTTP/1.1" 200 -
|
192.168.2.8 - - [23/Apr/2026 18:08:18] "GET /api/projects HTTP/1.1" 200 -
|
||||||
127.0.0.1 - - [23/Apr/2026 17:53:36] "GET / HTTP/1.1" 200 -
|
127.0.0.1 - - [23/Apr/2026 18:08:18] "GET / HTTP/1.1" 200 -
|
||||||
192.168.2.8 - - [23/Apr/2026 17:53:37] "GET /api/projects HTTP/1.1" 200 -
|
192.168.2.8 - - [23/Apr/2026 18:08:20] "GET /api/projects HTTP/1.1" 200 -
|
||||||
127.0.0.1 - - [23/Apr/2026 17:53:44] "GET / HTTP/1.1" 200 -
|
127.0.0.1 - - [23/Apr/2026 18:08:28] "GET / HTTP/1.1" 200 -
|
||||||
127.0.0.1 - - [23/Apr/2026 17:53:44] "GET / HTTP/1.1" 200 -
|
192.168.2.8 - - [23/Apr/2026 18:08:30] "GET /api/projects HTTP/1.1" 200 -
|
||||||
192.168.2.8 - - [23/Apr/2026 17:53:46] "GET /api/projects HTTP/1.1" 200 -
|
127.0.0.1 - - [23/Apr/2026 18:08:35] "GET / HTTP/1.1" 200 -
|
||||||
192.168.2.14 - - [23/Apr/2026 17:53:46] "GET /api/projects HTTP/1.1" 200 -
|
127.0.0.1 - - [23/Apr/2026 18:08:38] "GET / HTTP/1.1" 200 -
|
||||||
127.0.0.1 - - [23/Apr/2026 17:53:46] "GET / HTTP/1.1" 200 -
|
192.168.2.8 - - [23/Apr/2026 18:08:40] "GET /api/projects HTTP/1.1" 200 -
|
||||||
192.168.2.14 - - [23/Apr/2026 17:53:46] "GET /api/system/stats HTTP/1.1" 200 -
|
127.0.0.1 - - [23/Apr/2026 18:08:46] "GET / HTTP/1.1" 200 -
|
||||||
127.0.0.1 - - [23/Apr/2026 17:53:47] "GET / HTTP/1.1" 200 -
|
127.0.0.1 - - [23/Apr/2026 18:08:47] "GET / HTTP/1.1" 200 -
|
||||||
192.168.2.8 - - [23/Apr/2026 17:53:47] "GET /api/projects HTTP/1.1" 200 -
|
192.168.2.8 - - [23/Apr/2026 18:08:48] "GET /api/projects HTTP/1.1" 200 -
|
||||||
192.168.2.14 - - [23/Apr/2026 17:53:49] "GET /api/projects HTTP/1.1" 200 -
|
127.0.0.1 - - [23/Apr/2026 18:08:48] "GET / HTTP/1.1" 200 -
|
||||||
127.0.0.1 - - [23/Apr/2026 17:53:54] "GET / HTTP/1.1" 200 -
|
192.168.2.8 - - [23/Apr/2026 18:08:50] "GET /api/projects HTTP/1.1" 200 -
|
||||||
192.168.2.14 - - [23/Apr/2026 17:53:56] "GET /api/projects HTTP/1.1" 200 -
|
|
||||||
127.0.0.1 - - [23/Apr/2026 17:53:56] "GET / HTTP/1.1" 200 -
|
|
||||||
192.168.2.8 - - [23/Apr/2026 17:53:58] "GET /api/projects HTTP/1.1" 200 -
|
|
||||||
|
|||||||
Reference in New Issue
Block a user