🚀 Auto-deploy: BrainKP atualizado em 22/06/2026 19:03:51

This commit is contained in:
2026-06-22 19:03:51 +00:00
parent ac1c573df9
commit 2f9eed7cd6
+3 -3
View File
@@ -277,14 +277,14 @@ async function loadStatus() {
let runningScripts = []; let runningScripts = [];
if (lr) { if (lr) {
const isRunning = lr.scripts.some(s => s.status === 'running'); const isRunning = lr.scripts && lr.scripts.some(s => s.status === 'running');
if (isRunning) { if (isRunning) {
isAnyRunning = true; isAnyRunning = true;
runningScripts = lr.scripts.filter(s => s.status === 'running').map(s => s.name); runningScripts = lr.scripts ? lr.scripts.filter(s => s.status === 'running').map(s => s.name) : [];
badge.innerHTML = '<span class="loading" style="width:10px;height:10px;margin-right:4px;border-width:2px"></span> Em andamento'; badge.innerHTML = '<span class="loading" style="width:10px;height:10px;margin-right:4px;border-width:2px"></span> Em andamento';
badge.className = 'badge yellow'; badge.className = 'badge yellow';
} else { } else {
const ok = !lr.has_error && lr.scripts.every(s => s.status === 'ok'); const ok = !lr.has_error && lr.scripts && lr.scripts.every(s => s.status === 'ok');
badge.textContent = ok ? '✓ Concluído' : '⚠ Erro'; badge.textContent = ok ? '✓ Concluído' : '⚠ Erro';
badge.className = `badge ${ok ? 'green' : 'red'}`; badge.className = `badge ${ok ? 'green' : 'red'}`;
} }