feat: Add yellow warning range (50-80%) for infrastructure monitors

Fixes #2615
This commit is contained in:
vineet-channe committed 2025-08-07 20:35:24 +05:30
1 parent 1765bf7e55
commit 424df24bf3
1 file changed
+8 -4
@@ -64,10 +64,14 @@ const CustomGauge = ({
const progressWithinRange = Math.max(MINIMUM_VALUE, Math.min(progress, MAXIMUM_VALUE)); const progressWithinRange = Math.max(MINIMUM_VALUE, Math.min(progress, MAXIMUM_VALUE));
const fillColor = let fillColor;
progressWithinRange > threshold if (progressWithinRange < 50) {
? theme.palette.error.lowContrast fillColor = theme.palette.success.main;
: theme.palette.accent.main; } else if (progressWithinRange < 80) {
fillColor = theme.palette.warning.lowContrast;
} else {
fillColor = theme.palette.error.lowContrast;
}
if (isLoading) { if (isLoading) {
return ( return (