mirror of
https://github.com/DeNNiiInc/UltyScan.git
synced 2026-04-17 20:35:59 +00:00
Add live console output streaming
This commit is contained in:
@@ -210,6 +210,7 @@ let statusInterval = null;
|
||||
async function checkScanStatus() {
|
||||
const statusBadge = document.getElementById("scan-status");
|
||||
const stopBtn = document.getElementById("stop-scan-btn");
|
||||
const consoleOutput = document.getElementById("console-output");
|
||||
if (!statusBadge) return;
|
||||
|
||||
try {
|
||||
@@ -227,6 +228,26 @@ async function checkScanStatus() {
|
||||
if (stopBtn) stopBtn.style.display = "none";
|
||||
stopStatusPolling();
|
||||
}
|
||||
|
||||
// Update console with log content
|
||||
if (consoleOutput && (result.logContent || result.workspaceOutput)) {
|
||||
let output = "UltyScan Console\n";
|
||||
output += "================\n";
|
||||
if (result.latestLogFile) {
|
||||
output += `Log: ${result.latestLogFile}\n`;
|
||||
}
|
||||
output += `Time: ${result.timestamp}\n`;
|
||||
output += "----------------\n\n";
|
||||
|
||||
if (result.workspaceOutput) {
|
||||
output += result.workspaceOutput;
|
||||
} else if (result.logContent) {
|
||||
output += result.logContent;
|
||||
}
|
||||
|
||||
consoleOutput.textContent = output;
|
||||
consoleOutput.scrollTop = consoleOutput.scrollHeight;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Status check failed:", error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user