Spaces:
Running
Running
fix: improve keepalive status message handling in renderDashboard function
Browse files- 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 |
-
:
|
| 419 |
-
?
|
| 420 |
-
:
|
|
|
|
|
|
|
| 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 = [
|