From ea7120eefa68e5bfa3271243af2bfba1d69a7e31 Mon Sep 17 00:00:00 2001 From: Amirul Islam Redwan Date: Fri, 11 Sep 2026 00:26:24 +0000 Subject: [PATCH] feat(saas): zero-error interactive sandbox & unified live navigation --- index.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index f0c4342..de22da4 100644 --- a/index.html +++ b/index.html @@ -850,7 +850,6 @@ function switchTab(key, btnEl) { document.getElementById('code-snippet').textContent = configs[key]; } -async function runSandboxCalc() { const dest = document.getElementById('calc-dest').value; const weight = parseInt(document.getElementById('calc-weight').value || '1', 10); @@ -899,16 +898,16 @@ function runSandboxFraud() { scoreEl.style.color = '#34d399'; } -function updateLiveTelemetry() { +async function updateLiveTelemetry() { const t0 = performance.now(); try { - const res = await fetch('/health'); + const res = await fetch('/health?format=json'); const latency = Math.round(performance.now() - t0); if (res.ok) { const data = await res.json(); const statusEl = document.querySelector('[data-i18n="health_status_val"]'); if (statusEl) { - const mem = data.memory_mb ? ` · ${data.memory_mb} MB heap` : ''; + const mem = data.performance?.heap_used_mb ? ` · ${data.performance.heap_used_mb} MB heap` : ''; statusEl.innerHTML = `● ` + (currentLang === 'bn' ? `চলমান (${latency}ms${mem})` : `Operational (${latency}ms${mem})`); }