Revert "Add indeterminate state to monitors, resolves #765"
This commit is contained in:
1 parent
6b60b473b2
commit
1bde8fdb86
6 files changed
+37
-50
No files matched your search
@@ -126,7 +126,6 @@ ColoredLabel.propTypes = {
|
||||
*/
|
||||
|
||||
const StatusLabel = ({ status, text, customStyles }) => {
|
||||
console.log(status);
|
||||
const theme = useTheme();
|
||||
const colors = {
|
||||
up: {
|
||||
@@ -139,11 +138,6 @@ const StatusLabel = ({ status, text, customStyles }) => {
|
||||
bgColor: theme.palette.error.bg,
|
||||
borderColor: theme.palette.error.light,
|
||||
},
|
||||
unknown: {
|
||||
dotColor: theme.palette.unresolved.main,
|
||||
bgColor: theme.palette.unresolved.bg,
|
||||
borderColor: theme.palette.unresolved.light,
|
||||
},
|
||||
"cannot resolve": {
|
||||
dotColor: theme.palette.unresolved.main,
|
||||
bgColor: theme.palette.unresolved.bg,
|
||||
@@ -176,7 +170,7 @@ const StatusLabel = ({ status, text, customStyles }) => {
|
||||
};
|
||||
|
||||
StatusLabel.propTypes = {
|
||||
status: PropTypes.oneOf(["up", "down", "unknown", "cannot resolve"]),
|
||||
status: PropTypes.oneOf(["up", "down", "cannot resolve"]),
|
||||
text: PropTypes.string,
|
||||
customStyles: PropTypes.object,
|
||||
};
|
||||
|
||||
@@ -48,6 +48,15 @@ export const buildData = (monitors, isAdmin, navigate) => {
|
||||
monitor.uptimePercentage === 0
|
||||
? "0"
|
||||
: (monitor.uptimePercentage * 100).toFixed(2);
|
||||
|
||||
percentageColor =
|
||||
monitor.uptimePercentage < 0.25
|
||||
? theme.palette.percentage.uptimePoor
|
||||
: monitor.uptimePercentage < 0.5
|
||||
? theme.palette.percentage.uptimeFair
|
||||
: monitor.uptimePercentage < 0.75
|
||||
? theme.palette.percentage.uptimeGood
|
||||
: theme.palette.percentage.uptimeExcellent;
|
||||
}
|
||||
|
||||
const params = {
|
||||
|
||||
Reference in new issue
Block a user