mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-23 23:11:13 -04:00
Fix: Add support for pending in badges
This commit is contained in:
parent
21b418230c
commit
0ed3dd5e4f
2 changed files with 7 additions and 0 deletions
|
@ -111,9 +111,11 @@ router.get("/api/badge/:id/status", cache("5 minutes"), async (request, response
|
|||
label,
|
||||
upLabel = "Up",
|
||||
downLabel = "Down",
|
||||
pendingLabel = "Pending",
|
||||
maintenanceLabel = "Maintenance",
|
||||
upColor = badgeConstants.defaultUpColor,
|
||||
downColor = badgeConstants.defaultDownColor,
|
||||
pendingColor = badgeConstants.defaultPendingColor,
|
||||
maintenanceColor = badgeConstants.defaultMaintenanceColor,
|
||||
style = badgeConstants.defaultStyle,
|
||||
value, // for demo purpose only
|
||||
|
@ -153,6 +155,10 @@ router.get("/api/badge/:id/status", cache("5 minutes"), async (request, response
|
|||
badgeValues.color = upColor;
|
||||
badgeValues.message = upLabel;
|
||||
break;
|
||||
case 2:
|
||||
badgeValues.color = pendingColor;
|
||||
badgeValues.message = pendingLabel;
|
||||
break;
|
||||
case 3:
|
||||
badgeValues.color = maintenanceColor;
|
||||
badgeValues.message = maintenanceLabel;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue