fix percentage uptimePoor

This commit is contained in:
Caio Cabral
2025-01-11 09:54:11 -05:00
parent dbd351b2f1
commit d027407562
4 changed files with 5 additions and 5 deletions

View File

@@ -54,7 +54,7 @@ const CustomGauge = ({ progress = 0, radius = 70, strokeWidth = 15, threshold =
const fillColor =
progressWithinRange > threshold
? theme.palette.percentage.uptimePoor
? theme.palette.error.main
: theme.palette.primary.main;
return (

View File

@@ -58,7 +58,7 @@ function Gauge({ progressValue, width = DEFAULT_WIDTH }) {
const chartColor =
progressValue > PROGRESS_THRESHOLD
? theme.palette.primary.main
: theme.palette.percentage.uptimePoor;
: theme.palette.error.main;
const chartData = [
CHART_MAXIMUM_DATA,
{
@@ -82,7 +82,7 @@ function Gauge({ progressValue, width = DEFAULT_WIDTH }) {
fill={
progressValue > PROGRESS_THRESHOLD
? theme.palette.primary.main
: theme.palette.percentage.uptimePoor
: theme.palette.error.main
}
background={{ fill: theme.palette.primary.lowContrast }}
label={{

View File

@@ -151,7 +151,7 @@ function Infrastructure() {
.toString();
const percentageColor =
monitor.uptimePercentage < 0.25
? theme.palette.percentage.uptimePoor
? theme.palette.error.main
: monitor.uptimePercentage < 0.5
? theme.palette.percentage.uptimeFair
: monitor.uptimePercentage < 0.75

View File

@@ -250,7 +250,7 @@ const MonitorTable = ({ isAdmin, filter, setIsSearching, isSearching, handlePaus
percentageColor =
/* TODO colors update */
monitor.uptimePercentage < 0.25
? theme.palette.percentage.uptimePoor
? theme.palette.error.main
: monitor.uptimePercentage < 0.5
? theme.palette.percentage.uptimeFair
: monitor.uptimePercentage < 0.75