mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-16 11:14:38 -05:00
minor fixes
This commit is contained in:
parent
1c5bce8afa
commit
d74404e106
@ -247,7 +247,7 @@ router.get("/api/badge/:id/:type", cache("5 minutes"), async (request, response)
|
|||||||
// return a "n/a" badge in grey, if monitor is not public / not available / non exsitant
|
// return a "n/a" badge in grey, if monitor is not public / not available / non exsitant
|
||||||
|
|
||||||
badgeValues.message = "N/A";
|
badgeValues.message = "N/A";
|
||||||
badgeValues.color = "#CCCCCC";
|
badgeValues.color = "#999";
|
||||||
} else {
|
} else {
|
||||||
const uptime = await Monitor.calcUptime(
|
const uptime = await Monitor.calcUptime(
|
||||||
requestedType,
|
requestedType,
|
||||||
|
@ -387,6 +387,6 @@ exports.percentageToColor = (percentage, maxHue = 90, minHue = 10) => {
|
|||||||
try {
|
try {
|
||||||
return chroma(`hsl(${hue}, 90%, 40%)`).hex();
|
return chroma(`hsl(${hue}, 90%, 40%)`).hex();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return "grey";
|
return "#999";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user