Add paused for state, refactored out logic for determining monitor state

This commit is contained in:
Alex Holliday committed 2024-09-08 11:21:35 -07:00
1 parent 15b79bc420
commit 698dac3413
5 files changed
+86 -164

No files matched your search

+12 -1
View File
@@ -138,6 +138,11 @@ const StatusLabel = ({ status, text, customStyles }) => {
bgColor: theme.palette.error.bg,
borderColor: theme.palette.error.light,
},
paused: {
dotColor: theme.palette.warning.main,
bgColor: theme.palette.warning.bg,
borderColor: theme.palette.warning.light,
},
pending: {
dotColor: theme.palette.warning.main,
bgColor: theme.palette.warning.bg,
@@ -175,7 +180,13 @@ const StatusLabel = ({ status, text, customStyles }) => {
};
StatusLabel.propTypes = {
status: PropTypes.oneOf(["up", "down", "pending", "cannot resolve"]),
status: PropTypes.oneOf([
"up",
"down",
"paused",
"pending",
"cannot resolve",
]),
text: PropTypes.string,
customStyles: PropTypes.object,
};