somratpro Copilot commited on
Commit
79e2809
·
1 Parent(s): 7f1876a

fix: improve keepalive status message handling in renderDashboard function

Browse files
Files changed (1) hide show
  1. health-server.js +5 -3
health-server.js CHANGED
@@ -415,9 +415,11 @@ function renderDashboard(data) {
415
  : "No status yet";
416
  const keepAliveDetail = keepaliveConfigured
417
  ? `Pinging <code>${escapeHtml(data.keepalive.targetUrl || "/health")}</code>`
418
- : process.env.CLOUDFLARE_WORKERS_TOKEN
419
- ? "Worker pending or failed"
420
- : "Not configured";
 
 
421
  const serviceOk = data.gateway && data.dashboard;
422
 
423
  const tiles = [
 
415
  : "No status yet";
416
  const keepAliveDetail = keepaliveConfigured
417
  ? `Pinging <code>${escapeHtml(data.keepalive.targetUrl || "/health")}</code>`
418
+ : keepaliveStatus === "error" && data.keepalive?.message
419
+ ? escapeHtml(data.keepalive.message)
420
+ : process.env.CLOUDFLARE_WORKERS_TOKEN
421
+ ? "Worker pending or failed"
422
+ : "Not configured";
423
  const serviceOk = data.gateway && data.dashboard;
424
 
425
  const tiles = [