Update ashboard, dashboard (~2)

This commit is contained in:
Echo
2026-02-15 23:25:18 +00:00
parent 2eca94abaf
commit 22806c826b
2 changed files with 36 additions and 0 deletions

View File

@@ -649,6 +649,10 @@
<i data-lucide="refresh-cw"></i>
Refresh
</button>
<button class="btn btn-secondary btn-warning" onclick="restartTaskboard()" title="Restart Taskboard">
<i data-lucide="rotate-cw"></i>
Restart TB
</button>
</div>
<!-- Services -->
@@ -1237,6 +1241,24 @@
}
}
// ── Taskboard Restart ─────────────────────────────────────
async function restartTaskboard() {
if (!confirm('Restart taskboard? Pagina va fi indisponibila ~5 secunde.')) return;
try {
await fetch('/echo/api/eco/restart-taskboard', { method: 'POST' });
} catch (e) { /* expected — server dies */ }
// Wait for restart, then reload
setTimeout(() => {
const check = setInterval(async () => {
try {
const r = await fetch('/echo/api/status');
if (r.ok) { clearInterval(check); location.reload(); }
} catch (e) { /* still restarting */ }
}, 1000);
}, 2000);
}
// ── Init ────────────────────────────────────────────────
loadStatus();