mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-23 02:00:20 -06:00
feat: Add yellow warning range (50-80%) for infrastructure monitors
Fixes #2615
This commit is contained in:
@@ -64,10 +64,14 @@ const CustomGauge = ({
|
||||
|
||||
const progressWithinRange = Math.max(MINIMUM_VALUE, Math.min(progress, MAXIMUM_VALUE));
|
||||
|
||||
const fillColor =
|
||||
progressWithinRange > threshold
|
||||
? theme.palette.error.lowContrast
|
||||
: theme.palette.accent.main;
|
||||
let fillColor;
|
||||
if (progressWithinRange < 50) {
|
||||
fillColor = theme.palette.success.main;
|
||||
} else if (progressWithinRange < 80) {
|
||||
fillColor = theme.palette.warning.lowContrast;
|
||||
} else {
|
||||
fillColor = theme.palette.error.lowContrast;
|
||||
}
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user