diff --git a/app/ui/tasks.html b/app/ui/tasks.html index 9ed6f14..4e9f439 100644 --- a/app/ui/tasks.html +++ b/app/ui/tasks.html @@ -290,7 +290,7 @@ function nfNodeLabel(nf) { } async function fetchNetworkStatus() { - const r = await fetch('/api/network/status'); + const r = await fetch('./api/network/status'); if (!r.ok) throw new Error('HTTP ' + r.status); return await r.json(); } @@ -437,7 +437,7 @@ async function pingNFs() { async function refreshAlerts() { addLog('▸ Pulling latest alerts from Alertmanager…', 'run'); try { - const r = await fetch('/api/alerts'); + const r = await fetch('./api/alerts'); const d = await r.json(); const alerts = d.alerts || []; if (alerts.length === 0) { @@ -482,13 +482,13 @@ async function emulatedSession() { let lastIdx = 0; let pollTimer = null; try { - const startResp = await fetch('/api/emulated-session/start', { method: 'POST' }); + const startResp = await fetch('./api/emulated-session/start', { method: 'POST' }); if (!startResp.ok) throw new Error('Failed to start session (HTTP ' + startResp.status + ')'); const { task_id } = await startResp.json(); addLog(' Task started — polling for live output…', 'info'); pollTimer = setInterval(async () => { try { - const resp = await fetch(`/api/emulated-session/status/${task_id}`); + const resp = await fetch(`./api/emulated-session/status/${task_id}`); if (!resp.ok) throw new Error('Status fetch failed'); const data = await resp.json(); data.logs.slice(lastIdx).forEach(l => addLog(l.msg, l.type)); @@ -574,7 +574,7 @@ function exportLogs() { // ── Health dot ──────────────────────────────────────────────────────────── async function checkHealth() { try { - const r = await fetch('/health'); + const r = await fetch('./health'); if (r.ok) { document.getElementById('dot').classList.remove('err'); document.getElementById('connLabel').textContent = 'Service connected';