|
|
@ -111,9 +111,11 @@ router.get("/api/badge/:id/status", cache("5 minutes"), async (request, response
|
|
|
|
label,
|
|
|
|
label,
|
|
|
|
upLabel = "Up",
|
|
|
|
upLabel = "Up",
|
|
|
|
downLabel = "Down",
|
|
|
|
downLabel = "Down",
|
|
|
|
|
|
|
|
pendingLabel = "Pending",
|
|
|
|
maintenanceLabel = "Maintenance",
|
|
|
|
maintenanceLabel = "Maintenance",
|
|
|
|
upColor = badgeConstants.defaultUpColor,
|
|
|
|
upColor = badgeConstants.defaultUpColor,
|
|
|
|
downColor = badgeConstants.defaultDownColor,
|
|
|
|
downColor = badgeConstants.defaultDownColor,
|
|
|
|
|
|
|
|
pendingColor = badgeConstants.defaultPendingColor,
|
|
|
|
maintenanceColor = badgeConstants.defaultMaintenanceColor,
|
|
|
|
maintenanceColor = badgeConstants.defaultMaintenanceColor,
|
|
|
|
style = badgeConstants.defaultStyle,
|
|
|
|
style = badgeConstants.defaultStyle,
|
|
|
|
value, // for demo purpose only
|
|
|
|
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.color = upColor;
|
|
|
|
badgeValues.message = upLabel;
|
|
|
|
badgeValues.message = upLabel;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 2:
|
|
|
|
|
|
|
|
badgeValues.color = pendingColor;
|
|
|
|
|
|
|
|
badgeValues.message = pendingLabel;
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
case 3:
|
|
|
|
badgeValues.color = maintenanceColor;
|
|
|
|
badgeValues.color = maintenanceColor;
|
|
|
|
badgeValues.message = maintenanceLabel;
|
|
|
|
badgeValues.message = maintenanceLabel;
|
|
|
|