fix: rename "breached" status to "exceeded" for clarity
The word "breached" in infrastructure monitoring was confusing users as it implied a security breach. Renamed to "exceeded" which better describes threshold violations (e.g. "threshold exceeded"). ## Changes - Renamed monitor status value from "breached" to "exceeded" across server types, status service, queue helper, notification builder, email subject lines, and MongoDB aggregation queries - Renamed client types, status box/label components, translation key, and infrastructure page props to match - Added DB migration (0005) to update existing monitors with the old status value
This commit is contained in:
1 parent
eac470cb68
commit
943ef92053
15 files changed
+63
-36
No files matched your search
@@ -139,12 +139,12 @@ export const InitializingStatusBox = ({ n }: { n: number }) => {
|
||||
/>
|
||||
);
|
||||
};
|
||||
export const BreachedStatusBox = ({ n }: { n: number }) => {
|
||||
export const ExceededStatusBox = ({ n }: { n: number }) => {
|
||||
const theme = useTheme();
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<StatusBox
|
||||
label={t("pages.common.monitors.status.breached")}
|
||||
label={t("pages.common.monitors.status.exceeded")}
|
||||
n={n}
|
||||
color={theme.palette.warning.main}
|
||||
/>
|
||||
|
||||
@@ -21,8 +21,8 @@ export const StatusLabel = ({ status, sx }: { status: MonitorStatus; sx?: SxProp
|
||||
return t("pages.common.monitors.status.up");
|
||||
} else if (status === "down") {
|
||||
return t("pages.common.monitors.status.down");
|
||||
} else if (status === "breached") {
|
||||
return t("pages.common.monitors.status.breached");
|
||||
} else if (status === "exceeded") {
|
||||
return t("pages.common.monitors.status.exceeded");
|
||||
} else if (status === "maintenance") {
|
||||
return t("pages.common.monitors.status.maintenance");
|
||||
} else if (status === "paused") {
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
DownStatusBox,
|
||||
PausedStatusBox,
|
||||
InitializingStatusBox,
|
||||
BreachedStatusBox,
|
||||
ExceededStatusBox,
|
||||
} from "@/Components/design-elements";
|
||||
import Stack from "@mui/material/Stack";
|
||||
|
||||
@@ -12,12 +12,12 @@ import { useTheme } from "@mui/material";
|
||||
|
||||
interface MonitorsSummaryProps {
|
||||
summary: MonitorsSummary | null;
|
||||
showBreached?: boolean;
|
||||
showExceeded?: boolean;
|
||||
}
|
||||
|
||||
export const HeaderMonitorsSummary = ({
|
||||
summary,
|
||||
showBreached = false,
|
||||
showExceeded = false,
|
||||
}: MonitorsSummaryProps) => {
|
||||
const theme = useTheme();
|
||||
return (
|
||||
@@ -27,7 +27,7 @@ export const HeaderMonitorsSummary = ({
|
||||
>
|
||||
<UpStatusBox n={summary?.upMonitors || 0} />
|
||||
<DownStatusBox n={summary?.downMonitors || 0} />
|
||||
{showBreached && <BreachedStatusBox n={summary?.breachedMonitors || 0} />}
|
||||
{showExceeded && <ExceededStatusBox n={summary?.exceededMonitors || 0} />}
|
||||
<PausedStatusBox n={summary?.pausedMonitors || 0} />
|
||||
<InitializingStatusBox n={summary?.initializingMonitors || 0} />
|
||||
</Stack>
|
||||
|
||||
@@ -135,7 +135,7 @@ const InfrastructureMonitors = () => {
|
||||
/>
|
||||
<HeaderMonitorsSummary
|
||||
summary={summary}
|
||||
showBreached={true}
|
||||
showExceeded={true}
|
||||
/>
|
||||
<Stack
|
||||
direction={isSmall ? "column" : "row"}
|
||||
|
||||
@@ -32,7 +32,7 @@ export const MonitorStatuses = [
|
||||
"paused",
|
||||
"initializing",
|
||||
"maintenance",
|
||||
"breached",
|
||||
"exceeded",
|
||||
] as const;
|
||||
export type MonitorStatus = (typeof MonitorStatuses)[number];
|
||||
|
||||
@@ -90,7 +90,7 @@ export interface MonitorsSummary {
|
||||
pausedMonitors: number;
|
||||
initializingMonitors: number;
|
||||
maintenanceMonitors: number;
|
||||
breachedMonitors: number;
|
||||
exceededMonitors: number;
|
||||
}
|
||||
|
||||
export interface MonitorsWithChecksResponse {
|
||||
|
||||
@@ -25,7 +25,7 @@ export const getStatusPalette = (status: MonitorStatus): PaletteKey => {
|
||||
if (status === "down") {
|
||||
return "error";
|
||||
}
|
||||
if (status === "breached") {
|
||||
if (status === "exceeded") {
|
||||
return "error";
|
||||
}
|
||||
return "warning";
|
||||
|
||||
@@ -401,7 +401,7 @@
|
||||
},
|
||||
"status": {
|
||||
"down": "down",
|
||||
"breached": "breached",
|
||||
"exceeded": "threshold exceeded",
|
||||
"initializing": "initializing",
|
||||
"maintenance": "maintenance",
|
||||
"paused": "paused",
|
||||
|
||||
Reference in new issue
Block a user