add indeterminate state back to monitorData after bad conflict resolution (#785)
This commit is contained in:
1 parent
cfc2700d19
commit
88316de306
1 file changed
+8
-3
@@ -40,7 +40,7 @@ export const buildData = (monitors, isAdmin, navigate) => {
|
|||||||
|
|
||||||
data.rows = monitors.map((monitor, idx) => {
|
data.rows = monitors.map((monitor, idx) => {
|
||||||
let uptimePercentage = "";
|
let uptimePercentage = "";
|
||||||
let percentageColor = theme.palette.percentage.uptimeExcellent;
|
let percentageColor = theme.palette.percentage.uptimeExcellent;
|
||||||
|
|
||||||
// Determine uptime percentage and color based on the monitor's uptimePercentage value
|
// Determine uptime percentage and color based on the monitor's uptimePercentage value
|
||||||
if (monitor.uptimePercentage !== undefined) {
|
if (monitor.uptimePercentage !== undefined) {
|
||||||
@@ -63,8 +63,13 @@ export const buildData = (monitors, isAdmin, navigate) => {
|
|||||||
url: monitor.url,
|
url: monitor.url,
|
||||||
title: monitor.name,
|
title: monitor.name,
|
||||||
percentage: uptimePercentage,
|
percentage: uptimePercentage,
|
||||||
percentageColor,
|
percentageColor,
|
||||||
status: monitor.status === true ? "up" : "down",
|
status:
|
||||||
|
monitor.status === undefined
|
||||||
|
? "unknown"
|
||||||
|
: monitor.status === true
|
||||||
|
? "up"
|
||||||
|
: "down",
|
||||||
};
|
};
|
||||||
|
|
||||||
// Reverse checks so the latest check is on the right
|
// Reverse checks so the latest check is on the right
|
||||||
|
|||||||
Reference in new issue
Block a user