From 54548e34edfa17fd5930901dd66c48ce6b28684a Mon Sep 17 00:00:00 2001 From: Wooferz <85282355+woooferz@users.noreply.github.com> Date: Wed, 8 Jun 2022 20:05:10 +1000 Subject: [PATCH] Added label to status badge --- server/routers/api-router.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server/routers/api-router.js b/server/routers/api-router.js index 201efc41f..d71f903a0 100644 --- a/server/routers/api-router.js +++ b/server/routers/api-router.js @@ -136,6 +136,7 @@ router.get("/api/badge/:id/status", cache("5 minutes"), async (request, response const heartbeat = await Monitor.getPreviousHeartbeat(requestedMonitorId); const state = overrideValue !== undefined ? overrideValue : heartbeat.status === 1; + badgeValues.label = label ? label : ""; badgeValues.color = state ? upColor : downColor; badgeValues.message = label ?? state ? upLabel : downLabel; }