From 3eff6b06c5db756e46d25c3dadd2181757f74439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=B8=80=E4=B8=81?= <1769123563@qq.com> Date: Thu, 20 Nov 2025 02:31:47 +0800 Subject: [PATCH] Displays Information above DEBUG --- templates/index.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/templates/index.html b/templates/index.html index adfa848..8199086 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4208,6 +4208,7 @@ let reportTaskId = null; let reportPollingInterval = null; let reportEventSource = null; + let reportLogRefreshInterval = null; // 日志刷新定时器 let reportAutoPreviewLoaded = false; let reportStreamReconnectTimer = null; let reportStreamRetryDelay = 3000; @@ -4920,6 +4921,14 @@ updateReportStreamStatus('connected'); appendReportStreamLine(isRetry ? 'SSE重连成功' : 'Report Engine流式连接已建立', 'success', { badge: 'SSE' }); startStreamHeartbeat(); + + // 启动日志刷新定时器,每1秒刷新一次日志 + if (reportLogRefreshInterval) { + clearInterval(reportLogRefreshInterval); + } + reportLogRefreshInterval = setInterval(() => { + refreshReportLog(); + }, 1000); // 每1秒刷新一次 }; reportEventSource.onerror = () => { appendReportStreamLine('检测到网络抖动,SSE正在等待自动重连...', 'warn', { badge: 'SSE' }); @@ -4946,6 +4955,11 @@ clearTimeout(reportStreamReconnectTimer); reportStreamReconnectTimer = null; } + // 清除日志刷新定时器 + if (reportLogRefreshInterval) { + clearInterval(reportLogRefreshInterval); + reportLogRefreshInterval = null; + } clearStreamHeartbeat(); if (!keepIndicator) { updateReportStreamStatus('idle');