From 424df24bf39833c8f741789e6286009d4e3212fc Mon Sep 17 00:00:00 2001 From: vineet-channe Date: Thu, 7 Aug 2025 20:35:24 +0530 Subject: [PATCH] feat: Add yellow warning range (50-80%) for infrastructure monitors Fixes #2615 --- client/src/Components/Charts/CustomGauge/index.jsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/client/src/Components/Charts/CustomGauge/index.jsx b/client/src/Components/Charts/CustomGauge/index.jsx index d9718d72c..132cb4237 100644 --- a/client/src/Components/Charts/CustomGauge/index.jsx +++ b/client/src/Components/Charts/CustomGauge/index.jsx @@ -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 (