This commit is contained in:
Alex Holliday committed 2025-12-11 12:50:30 -08:00
1 parent b94e6052c3
commit 64d1ba08f9
23 files changed
+1657 -170

No files matched your search

@@ -47,7 +47,7 @@ export const HeaderCreate = ({
>
{limitReached
? "Your plan's limit has been reached"
: label || t("createNew")}
: label || t("common.buttons.createNew")}
</Button>
</span>
</Tooltip>
+7 -5
View File
@@ -3,6 +3,7 @@ import { ButtonGroup, Button } from "@/components/inputs";
import { useTheme } from "@mui/material/styles";
import Typography from "@mui/material/Typography";
import useMediaQuery from "@mui/material/useMediaQuery";
import { useTranslation } from "react-i18next";
export const HeaderRange = ({
range,
setRange,
@@ -14,6 +15,7 @@ export const HeaderRange = ({
loading: boolean;
all?: boolean;
}) => {
const { t } = useTranslation();
const theme = useTheme();
const isSmall = useMediaQuery(theme.breakpoints.down("md"));
return (
@@ -45,7 +47,7 @@ export const HeaderRange = ({
: undefined
}
>
All
{t("common.buttons.range.all")}
</Button>
)}
<Button
@@ -61,7 +63,7 @@ export const HeaderRange = ({
: undefined
}
>
Recent
{t("common.buttons.range.recent")}
</Button>
<Button
variant="contained"
@@ -76,7 +78,7 @@ export const HeaderRange = ({
: undefined
}
>
Day
{t("common.buttons.range.day")}
</Button>
<Button
variant="contained"
@@ -91,7 +93,7 @@ export const HeaderRange = ({
: undefined
}
>
7 days
{t("common.buttons.range.week")}
</Button>
<Button
variant="contained"
@@ -106,7 +108,7 @@ export const HeaderRange = ({
: undefined
}
>
30 days
{t("common.buttons.range.month")}
</Button>
</ButtonGroup>
</Stack>
@@ -127,9 +127,9 @@ export const MonitorBasePageWithStates: React.FC<
return (
<EmptyMonitorFallback
page={page}
title={t(`${page}Monitor.fallback.title`)}
bullets={t(`${page}Monitor.fallback.checks`, { returnObjects: true })}
actionButtonText={t(`${page}Monitor.fallback.actionButton`)}
title={t(`monitors.${page}.fallback.title`)}
bullets={t(`monitors.${page}.fallback.checks`, { returnObjects: true })}
actionButtonText={t(`monitors.${page}.fallback.actionButton`)}
actionLink={actionLink || ""}
monitorLimitReached={monitorLimitReached}
/>
@@ -41,7 +41,11 @@ const StatusBox = ({
return (
<BGBox>
<Stack spacing={theme.spacing(4)}>
<Typography variant={"h2"} textTransform="uppercase" color={theme.palette.text.secondary}>
<Typography
variant={"h2"}
textTransform="uppercase"
color={theme.palette.text.secondary}
>
{label}
</Typography>
<Typography variant="h1" color={color}>
@@ -55,23 +59,47 @@ const StatusBox = ({
export const UpStatusBox = ({ n }: { n: number }) => {
const theme = useTheme();
const { t } = useTranslation();
return <StatusBox label={t("monitorStatus.up")} n={n} color={theme.palette.success.light} />;
return (
<StatusBox
label={t("monitors.common.status.up")}
n={n}
color={theme.palette.success.light}
/>
);
};
export const DownStatusBox = ({ n }: { n: number }) => {
const theme = useTheme();
const { t } = useTranslation();
return <StatusBox label={t("monitorStatus.down")} n={n} color={theme.palette.error.light} />;
return (
<StatusBox
label={t("monitors.common.status.down")}
n={n}
color={theme.palette.error.light}
/>
);
};
export const PausedStatusBox = ({ n }: { n: number }) => {
const theme = useTheme();
const { t } = useTranslation();
return <StatusBox label={t("monitorStatus.paused")} n={n} color={theme.palette.warning.light} />;
return (
<StatusBox
label={t("monitors.common.status.paused")}
n={n}
color={theme.palette.warning.light}
/>
);
};
export const InitializingStatusBox = ({ n }: { n: number }) => {
const theme = useTheme();
const { t } = useTranslation();
return <StatusBox label={t("monitorStatus.initializing")} n={n} color={theme.palette.warning.light} />;
return (
<StatusBox
label={t("monitors.common.status.initializing")}
n={n}
color={theme.palette.warning.light}
/>
);
};
@@ -22,6 +22,7 @@ import {
import TablePagination from "@mui/material/TablePagination";
import type { TablePaginationProps } from "@mui/material/TablePagination";
import { useTranslation } from "react-i18next";
import { useState, Fragment } from "react";
import { useTheme } from "@mui/material/styles";
import useMediaQuery from "@mui/material/useMediaQuery";
@@ -362,6 +363,7 @@ export const Pagination: React.FC<TablePaginationProps> = ({ ...props }) => {
const EmptyView = () => {
const theme = useTheme();
const { t } = useTranslation();
return (
<Stack
alignItems={"center"}
@@ -373,7 +375,7 @@ const EmptyView = () => {
borderRadius: theme.shape.borderRadius,
}}
>
<Typography>No data</Typography>
<Typography>{t("monitors.common.table.empty")}</Typography>
</Stack>
);
};
+4 -2
View File
@@ -5,6 +5,7 @@ import DialogContentText from "@mui/material/DialogContentText";
import DialogTitle from "@mui/material/DialogTitle";
import { Button } from "@/components/inputs";
import { typographyLevels } from "@/theme/palette";
import { useTranslation } from "react-i18next";
export const DialogInput = ({
open,
@@ -25,6 +26,7 @@ export const DialogInput = ({
cancelColor?: "error" | "primary";
loading?: boolean;
}) => {
const { t } = useTranslation();
return (
<Dialog open={open}>
<DialogTitle sx={{ fontSize: typographyLevels.l }}>{title}</DialogTitle>
@@ -38,7 +40,7 @@ export const DialogInput = ({
color={cancelColor}
onClick={onCancel}
>
Cancel
{t("common.buttons.cancel")}
</Button>
<Button
loading={loading}
@@ -46,7 +48,7 @@ export const DialogInput = ({
color={confirmColor}
onClick={onConfirm}
>
Confirm
{t("common.buttons.confirm")}
</Button>
</DialogActions>
</Dialog>
@@ -4,6 +4,7 @@ import Typography from "@mui/material/Typography";
import { Gauge } from "lucide-react";
import { Cell, RadialBarChart, RadialBar, ResponsiveContainer } from "recharts";
import { useTranslation } from "react-i18next";
import { getResponseTimeColor } from "@/utils/MonitorUtils";
import { useTheme } from "@mui/material/styles";
@@ -14,6 +15,7 @@ export const ChartAvgResponse = ({
avg: number;
max: number;
}) => {
const { t } = useTranslation();
const theme = useTheme();
const chartData = [
{ name: "max", value: max - avg, color: "transparent" },
@@ -28,7 +30,10 @@ export const ChartAvgResponse = ({
};
return (
<BaseChart icon={<Gauge size={20} strokeWidth={1.5} />} title={"Average response time"}>
<BaseChart
icon={<Gauge size={20} strokeWidth={1.5} />}
title={t("common.charts.avgResponseTime.title")}
>
<Stack height="100%" position={"relative"} justifyContent={"flex-end"}>
<ResponsiveContainer width="100%" height={155}>
<RadialBarChart
@@ -49,8 +54,12 @@ export const ChartAvgResponse = ({
</RadialBarChart>
</ResponsiveContainer>
<Stack direction={"row"} justifyContent={"space-between"}>
<Typography variant="body2">Low</Typography>
<Typography variant="body2">High</Typography>
<Typography variant="body2">
{t("common.charts.avgResponseTime.lowLabel")}
</Typography>
<Typography variant="body2">
{t("common.charts.avgResponseTime.highLabel")}
</Typography>
</Stack>
<Stack
position="absolute"
@@ -51,7 +51,7 @@ export const HeaderControls = ({
await post(`/monitors/${monitor._id}/notifications/test`, {});
}}
>
{t("sendTestNotifications")}
{t("common.buttons.testNotification")}
</Button>
)}
<Button
@@ -60,7 +60,7 @@ export const HeaderControls = ({
navigate(`/incidents?monitorId=${monitor._id}`);
}}
>
{t("menu.incidents")}
{t("common.buttons.incidents")}
</Button>
<Button
loading={isPatching || isPosting}
@@ -76,7 +76,9 @@ export const HeaderControls = ({
)
}
>
{monitor?.status === "paused" ? t("resume") : t("pause")}
{monitor?.status === "paused"
? t("common.buttons.resume")
: t("common.buttons.pause")}
</Button>
<Button
startIcon={<Settings size={20} strokeWidth={1.5} />}
@@ -84,7 +86,7 @@ export const HeaderControls = ({
navigate(`${path}/${monitor._id}/configure`);
}}
>
{t("configure")}
{t("common.buttons.configure")}
</Button>
</ButtonGroup>
</Stack>
@@ -5,6 +5,7 @@ import Typography from "@mui/material/Typography";
import { Select, Checkbox, TextInput } from "@/components/inputs";
import { LoadingSpinner } from "@/components/design-elements";
import { useTranslation } from "react-i18next";
import { useEffect, useState } from "react";
import { useTheme } from "@mui/material/styles";
import type { SelectChangeEvent } from "@mui/material/Select";
@@ -42,6 +43,7 @@ export const HeaderFilter = ({
loading = false,
}: HeaderFilterProps) => {
const theme = useTheme();
const { t } = useTranslation();
const [localSearch, setLocalSearch] = useState<string>(searchString);
useEffect(() => {
@@ -68,7 +70,7 @@ export const HeaderFilter = ({
return (
<Stack spacing={theme.spacing(4)} direction={{ xs: "column", sm: "row" }}>
<Select
placeholder="Monitor type"
placeholder={t("monitors.uptime.filters.type.placeholder")}
multiple
value={selectedTypes}
onChange={handleTypeChange}
@@ -83,7 +85,7 @@ export const HeaderFilter = ({
))}
</Select>
<Select
placeholder="Monitor status"
placeholder={t("monitors.uptime.filters.status.placeholder")}
multiple
value={selectedStatuses}
onChange={handleStatusChange}
@@ -100,7 +102,7 @@ export const HeaderFilter = ({
<LoadingSpinner show={loading} sx={{ alignSelf: "center" }} />
<Box flex={1} display={{ xs: "none", md: "inherit" }} />
<TextInput
placeholder="Search monitors"
placeholder={t("monitors.uptime.filters.search.placeholder")}
value={localSearch}
onChange={(event) => {
setLocalSearch(event.target.value);
@@ -7,6 +7,7 @@ import { TrendingUp, AlertTriangle } from "lucide-react";
import type { GroupedCheck } from "@/types/check";
import type { MonitorStatus } from "@/types/monitor";
import { useTranslation } from "react-i18next";
import { normalizeResponseTimes } from "@/utils/DataUtils";
import { useState } from "react";
import { formatDateWithTz } from "@/utils/TimeUtils";
@@ -63,9 +64,15 @@ export const HistogramStatus = ({
range: string;
title: string;
}) => {
const { t } = useTranslation();
const uiTimezone = useAppSelector((state: any) => state.ui.timezone);
const icon = status === "up" ? <TrendingUp size={20} strokeWidth={1.5} /> : <AlertTriangle size={20} strokeWidth={1.5} />;
const icon =
status === "up" ? (
<TrendingUp size={20} strokeWidth={1.5} />
) : (
<AlertTriangle size={20} strokeWidth={1.5} />
);
const theme = useTheme();
const [idx, setIdx] = useState<number | null>(null);
const dateFormat = range === "1d" || range === "2h" ? "MMM D, h A" : "MMM D";
@@ -76,7 +83,9 @@ export const HistogramStatus = ({
<BaseChart icon={icon} title={title}>
<Stack height={"100%"} alignItems={"center"} justifyContent={"center"}>
<Typography variant="h2">
{status === "up" ? "No checks yet" : "Great, no downtime yet!"}
{status === "up"
? t("common.charts.uptime.emptyUp")
: t("common.charts.uptime.emptyDown")}
</Typography>
</Stack>
</BaseChart>
+206 -5
View File
@@ -1,6 +1,46 @@
{
"common": {
"appName": "Checkmate"
"appName": "Checkmate",
"buttons": {
"incidents": "Incidents",
"delete": "Delete",
"confirm": "Confirm",
"cancel": "Cancel",
"save": "Save",
"pause": "Pause",
"resume": "Resume",
"configure": "Configure",
"createNew": "Create new",
"toggleTheme": "Toggle theme",
"testNotification": "Send test notification",
"range": {
"all": "All",
"recent": "Recent",
"day": "Day",
"week": "7 days",
"month": "30 days"
}
},
"dialog": {
"delete": {
"title": "Are you sure you want to delete this?",
"description": "This action cannot be undone."
}
},
"charts": {
"uptime": {
"upTitle": "Uptime",
"downTitle": "Downtime",
"detail": "Total checks",
"emptyUp": "No checks yet",
"emptyDown": "Great, no downtime!"
},
"avgResponseTime": {
"title": "Average Response Time",
"lowLabel": "Low",
"highLabel": "High"
}
}
},
"menu": {
"uptime": "Uptime",
@@ -18,10 +58,171 @@
},
"monitors": {
"common": {},
"uptime": {},
"pagespeed": {},
"infrastructure": {}
"common": {
"status": {
"down": "down",
"paused": "paused",
"initializing": "initializing",
"up": "up"
},
"stats": {
"activeFor": "Active for",
"lastCheck": "Last checked",
"lastResponseTime": "Last response time",
"certificate": "Certificate expiry"
},
"table": {
"headers": {
"name": "Name",
"type": "Type",
"status": "Status",
"statusCode": "Status code",
"message": "Message",
"dateTime": "Date & Time",
"responseTime": "Response time",
"pageSpeedScore": "PageSpeed Score",
"actions": "Actions",
"cpu": "CPU",
"memory": "Memory",
"disk": "Disk"
},
"empty": "No data"
},
"actions": {
"openSite": "Open site",
"details": "Details",
"incidents": "Incidents",
"configure": "Configure"
},
"form": {
"general": {
"title": "General settings"
},
"incidents": {
"title": "Incidents",
"description": "Number of consecutive checks needed to change monitor status. Maximum 25",
"optionIncidentCount": "How many checks before status change?"
},
"notifications": {
"title": "Notifications",
"description": "Select the notifications channels you want to use",
"optionNotificationChannels": "Choose a notification channel ({{count}} available)"
},
"interval": {
"title": "Check interval",
"description": "How often should we check the monitor?",
"optionInterval": "Check interval"
},
"optionHttp": "HTTP",
"optionHttps": "HTTPS",
"optionUrl": "URL",
"optionDisplayName": "Display name"
}
},
"uptime": {
"infoBox": {
"title": "Website & API Uptime Monitoring",
"description": "Monitor your websites and APIs to ensure they're always accessible. Get instant alerts when your services go down and track uptime history over time."
},
"fallback": {
"title": "An uptime monitor is used to:",
"actionButton": "Create a monitor!",
"checks": [
"Check if websites or servers are online & responsive",
"Alert teams about downtime or performance issues",
"Monitor HTTP endpoints, pings, containers & ports",
"Track historical uptime and reliability trends"
]
},
"form": {
"type": {
"title": "Type of check",
"description": "Select the type of uptime monitor to create.",
"optionHttpsDescription": "Use HTTPS to monitor your website or API endpoint.",
"optionHttpDescription": "Use HTTP to monitor your website or API endpoint.",
"optionPing": "Ping",
"optionPingDescription": "Use ICMP Ping to monitor if a server is online.",
"optionPort": "Port",
"optionPortDescription": "Monitor if a specific port on a server is open."
},
"general": {
"description": {
"https": "Enter the URL or IP to monitor (e.g., https://example.com/ or 192.168.1.100) and add a clear display name that appears on the dashboard.",
"http": "Enter the URL or IP to monitor (e.g., https://example.com/ or 192.168.1.100) and add a clear display name that appears on the dashboard.",
"ping": "Enter the IP address or hostname to ping (e.g., 192.168.1.100 or example.com) and add a clear display name that appears on the dashboard.",
"port": "Enter the URL or IP of the server, the port number and a clear display name that appears on the dashboard."
},
"optionPort": "Port"
},
"rejectUnauthorized": {
"title": "Reject unauthorized",
"description": "Disable to allow self-signed SSL certificates",
"optionEnabled": "Enabled (recommended)",
"optionDisabled": "Disabled"
}
},
"filters": {
"type": {
"placeholder": "Monitor type"
},
"status": {
"placeholder": "Monitor status"
},
"search": {
"placeholder": "Search monitors..."
}
}
},
"pageSpeed": {
"infoBox": {
"title": "Website Performance Tracking",
"description": "Measure how fast your websites load and identify performance bottlenecks. Track Core Web Vitals and get actionable insights to improve user experience."
},
"fallback": {
"title": "A PageSpeed monitor is used to:",
"actionButton": "Create a monitor!",
"checks": [
"Report on the user experience of a page",
"Help analyze webpage speed",
"Give suggestions on how the page can be improved"
]
},
"form": {
"general": {
"description": "Enter the URL of the website you want to carry out PageSpeed tests on"
}
}
},
"infrastructure": {
"infoBox": {
"title": "Infrastructure Monitoring",
"description": "Keep track of your servers' vital statistics including CPU usage, memory, disk space, and network performance. Receive alerts when resources run low."
},
"fallback": {
"actionButton": "Create a monitor!",
"checks": [
"Track the performance of your servers",
"Identify bottlenecks and optimize usage",
"Ensure reliability with real-time monitoring"
],
"title": "An infrastructure monitor is used to:"
},
"form": {
"general": {
"description": "Enter the IP address or hostname of the server you want to monitor, along with a clear display name that appears on the dashboard.",
"optionSecret": "Authorization secret"
},
"thresholds": {
"title": "Thresholds for alerts",
"description": "Set percentage thresholds to trigger incidents",
"optionCpuUsage": "CPU usage (%)",
"optionMemoryUsage": "Memory usage (%)",
"optionDiskUsage": "Disk usage (%)",
"optionTemperature": "Temperature (°C)"
}
}
}
},
"notifications": {},
"incidents": {},
File diff suppressed because it is too large. Load diff
+32 -22
View File
@@ -100,8 +100,8 @@ export const InfraForm = ({
return (
<BasePage component={"form"} onSubmit={handleSubmit(onSubmit)}>
<ConfigBox
title={t("settingsGeneralSettings")}
subtitle={t(`pageSpeedConfigureSettingsDescription`)}
title={t("monitors.common.form.general.title")}
subtitle={t(`monitors.infrastructure.form.general.description`)}
rightContent={
<Stack gap={theme.spacing(8)}>
<RadioGroup
@@ -113,12 +113,12 @@ export const InfraForm = ({
>
<RadioWithDescription
value="https"
label="HTTPS"
label={t("monitors.common.form.optionHttps")}
description=""
/>
<RadioWithDescription
value="http"
label={"HTTP"}
label={t("monitors.common.form.optionHttp")}
description={""}
/>
</RadioGroup>
@@ -140,7 +140,7 @@ export const InfraForm = ({
}, 0);
}}
type="text"
fieldLabel={t("url")}
fieldLabel={t("monitors.common.form.optionUrl")}
fullWidth
error={!!errors.url}
helperText={errors.url ? errors.url.message : ""}
@@ -155,7 +155,7 @@ export const InfraForm = ({
<TextInput
{...field}
type="text"
fieldLabel={t("displayName")}
fieldLabel={t("monitors.common.form.optionDisplayName")}
fullWidth
error={!!errors.name}
helperText={errors.name ? errors.name.message : ""}
@@ -169,7 +169,9 @@ export const InfraForm = ({
<TextInput
{...field}
type="text"
fieldLabel={t("infrastructureAuthorizationSecretLabel")}
fieldLabel={t(
"monitors.infrastructure.form.general.optionSecret"
)}
fullWidth
error={!!errors.secret}
helperText={errors.secret ? errors.secret.message : ""}
@@ -180,8 +182,8 @@ export const InfraForm = ({
}
/>
<ConfigBox
title={t("createMonitorPage.incidentConfigTitle")}
subtitle={t("createMonitorPage.incidentConfigDescriptionV2")}
title={t("monitors.common.form.incidents.title")}
subtitle={t("monitors.common.form.incidents.description")}
rightContent={
<Controller
name="n"
@@ -191,7 +193,7 @@ export const InfraForm = ({
{...field}
type="number"
fieldLabel={t(
"createMonitorPage.incidentConfigStatusCheckNumber"
"monitors.common.form.incidents.optionIncidentCount"
)}
fullWidth
error={!!errors.n}
@@ -206,8 +208,8 @@ export const InfraForm = ({
}
/>
<ConfigBox
title={t("Threshold Alerts")}
subtitle={t("Set percentage thresholds to trigger incidents.")}
title={t("monitors.infrastructure.form.thresholds.title")}
subtitle={t("monitors.infrastructure.form.thresholds.description")}
rightContent={
<Stack gap={theme.spacing(4)}>
<Controller
@@ -217,7 +219,9 @@ export const InfraForm = ({
<TextInput
{...field}
type="number"
fieldLabel={t("CPU %")}
fieldLabel={t(
"monitors.infrastructure.form.thresholds.optionCpuUsage"
)}
fullWidth
error={!!errors.thresholds?.cpu}
helperText={errors.thresholds?.cpu?.message ?? ""}
@@ -231,7 +235,9 @@ export const InfraForm = ({
<TextInput
{...field}
type="number"
fieldLabel={t("Memory %")}
fieldLabel={t(
"monitors.infrastructure.form.thresholds.optionMemoryUsage"
)}
fullWidth
error={!!errors.thresholds?.memory}
helperText={errors.thresholds?.memory?.message ?? ""}
@@ -245,7 +251,9 @@ export const InfraForm = ({
<TextInput
{...field}
type="number"
fieldLabel={t("Disk %")}
fieldLabel={t(
"monitors.infrastructure.form.thresholds.optionDiskUsage"
)}
fullWidth
error={!!errors.thresholds?.disk}
helperText={errors.thresholds?.disk?.message ?? ""}
@@ -259,7 +267,9 @@ export const InfraForm = ({
<TextInput
{...field}
type="number"
fieldLabel={t("Temperature °C")}
fieldLabel={t(
"monitors.infrastructure.form.thresholds.optionTemperature"
)}
fullWidth
error={!!errors.thresholds?.temperature}
helperText={errors.thresholds?.temperature?.message ?? ""}
@@ -270,8 +280,8 @@ export const InfraForm = ({
}
/>
<ConfigBox
title={t("notificationConfig.title")}
subtitle={t("notificationConfig.description")}
title={t("monitors.common.form.notifications.title")}
subtitle={t("monitors.common.form.notifications.description")}
rightContent={
<Stack>
<Controller
@@ -325,8 +335,8 @@ export const InfraForm = ({
}
/>
<ConfigBox
title={t("createMonitorPage.intervalTitle")}
subtitle="How often to check the URL"
title={t("monitors.common.form.interval.title")}
subtitle={t("monitors.common.form.interval.description")}
rightContent={
<Controller
name="interval"
@@ -335,7 +345,7 @@ export const InfraForm = ({
<TextInput
{...field}
type="text"
fieldLabel={t("createMonitorPage.intervalDescription")}
fieldLabel={t("monitors.common.form.interval.optionInterval")}
fullWidth
error={!!errors.interval}
helperText={errors.interval ? errors.interval.message : ""}
@@ -351,7 +361,7 @@ export const InfraForm = ({
variant="contained"
color="primary"
>
{t("settingsSave")}
{t("common.buttons.save")}
</Button>
</Stack>
</BasePage>
@@ -90,8 +90,8 @@ const PageSpeedMonitorsPage = () => {
actionLink="/infrastructure/create"
>
<InfoBox
title="Server Health Monitoring"
description="Keep track of your servers' vital statistics including CPU usage, memory, disk space, and network performance. Receive alerts when resources run low."
title={t("monitors.infrastructure.infoBox.title")}
description={t("monitors.infrastructure.infoBox.description")}
/>
<HeaderCreate
isLoading={loading}
@@ -123,8 +123,8 @@ const PageSpeedMonitorsPage = () => {
/>
<Dialog
open={isDialogOpen}
title={t("deleteDialogTitle")}
content={t("deleteDialogDescription")}
title={t("common.dialog.delete.title")}
content={t("common.dialog.delete.description")}
onConfirm={handleConfirm}
onCancel={handleCancel}
loading={isDeleting}
@@ -84,7 +84,7 @@ export const InfraMonitorsTable = ({
return [
{
id: 1,
label: "Open site",
label: t("monitors.common.actions.openSite"),
action: () => {
window.open(monitor.url, "_blank", "noreferrer");
},
@@ -92,21 +92,21 @@ export const InfraMonitorsTable = ({
},
{
id: 2,
label: "Details",
label: t("monitors.common.actions.details"),
action: () => {
navigate(`${monitor._id}`);
},
},
{
id: 3,
label: "Incidents",
label: t("monitors.common.actions.incidents"),
action: () => {
navigate(`/incidents?monitorId=${monitor._id}`);
},
},
{
id: 4,
label: "Configure",
label: t("monitors.common.actions.configure"),
action: () => {
navigate(`/infrastructure/${monitor._id}/configure`);
},
@@ -115,12 +115,15 @@ export const InfraMonitorsTable = ({
// id: 5,
// label: "Clone",
// action: () => {
// },
// },
{
id: 6,
label: monitor.status === "paused" ? "Resume" : "Pause",
label:
monitor.status === "paused"
? t("common.buttons.resume")
: t("common.buttons.pause"),
action: async () => {
await patch(`/monitors/${monitor._id}/active`);
refetch();
@@ -129,7 +132,11 @@ export const InfraMonitorsTable = ({
},
{
id: 7,
label: <Typography color={theme.palette.error.main}>Remove</Typography>,
label: (
<Typography color={theme.palette.error.main}>
{t("common.buttons.delete")}
</Typography>
),
action: () => {
setSelectedMonitor(monitor);
},
@@ -161,7 +168,7 @@ export const InfraMonitorsTable = ({
onClick={(e) => handleSort(e, "name")}
sx={{ cursor: "pointer" }}
>
{t("host")}
{t("monitors.common.table.headers.name")}
{renderSortIcon(sortField === "name")}
</Typography>
),
@@ -179,7 +186,7 @@ export const InfraMonitorsTable = ({
onClick={(e) => handleSort(e, "status")}
sx={{ cursor: "pointer" }}
>
{t("status")}
{t("monitors.common.table.headers.status")}
{renderSortIcon(sortField === "status")}
</Typography>
),
@@ -189,7 +196,7 @@ export const InfraMonitorsTable = ({
},
{
id: "cpu",
content: t("cpu"),
content: t("monitors.common.table.headers.cpu"),
render: (row) => {
const cpuUsage =
(row.latestChecks?.[0]?.system?.cpu?.usage_percent || 0) * 100;
@@ -198,7 +205,7 @@ export const InfraMonitorsTable = ({
},
{
id: "memory",
content: t("memory"),
content: t("monitors.common.table.headers.memory"),
render: (row) => {
const memoryUsage =
(row.latestChecks?.[0]?.system?.memory?.usage_percent || 0) * 100;
@@ -207,7 +214,7 @@ export const InfraMonitorsTable = ({
},
{
id: "disk",
content: t("disk"),
content: t("monitors.common.table.headers.disk"),
render: (row) => {
const totalDiskUsage = row.latestChecks?.[0]?.system?.disk?.reduce(
(acc, disk) => acc + disk.usage_percent,
@@ -221,7 +228,7 @@ export const InfraMonitorsTable = ({
{
id: "actions",
content: t("actions"),
content: t("monitors.common.table.headers.actions"),
render: (row) => {
return <ActionsMenu items={getActions(row)} />;
},
+17 -15
View File
@@ -100,8 +100,8 @@ export const PageSpeedForm = ({
return (
<BasePage component={"form"} onSubmit={handleSubmit(onSubmit)}>
<ConfigBox
title={t("settingsGeneralSettings")}
subtitle={t(`pageSpeedConfigureSettingsDescription`)}
title={t("monitors.common.form.general.title")}
subtitle={t("monitors.pageSpeed.form.general.description")}
rightContent={
<Stack gap={theme.spacing(8)}>
<RadioGroup
@@ -113,12 +113,12 @@ export const PageSpeedForm = ({
>
<RadioWithDescription
value="https"
label="HTTPS"
label={t("monitors.common.form.optionHttps")}
description=""
/>
<RadioWithDescription
value="http"
label={"HTTP"}
label={t("monitors.common.form.optionHttp")}
description={""}
/>
</RadioGroup>
@@ -140,7 +140,7 @@ export const PageSpeedForm = ({
}, 0);
}}
type="text"
fieldLabel={t("url")}
fieldLabel={t("monitors.common.form.optionUrl")}
fullWidth
error={!!errors.url}
helperText={errors.url ? errors.url.message : ""}
@@ -155,7 +155,7 @@ export const PageSpeedForm = ({
<TextInput
{...field}
type="text"
fieldLabel={t("displayName")}
fieldLabel={t("monitors.common.form.optionDisplayName")}
fullWidth
error={!!errors.name}
helperText={errors.name ? errors.name.message : ""}
@@ -166,8 +166,8 @@ export const PageSpeedForm = ({
}
/>
<ConfigBox
title={t("createMonitorPage.incidentConfigTitle")}
subtitle={t("createMonitorPage.incidentConfigDescriptionV2")}
title={t("monitors.common.form.incidents.title")}
subtitle={t("monitors.common.form.incidents.description")}
rightContent={
<Controller
name="n"
@@ -176,7 +176,9 @@ export const PageSpeedForm = ({
<TextInput
{...field}
type="number"
fieldLabel={t("createMonitorPage.incidentConfigStatusCheckNumber")}
fieldLabel={t(
"monitors.common.form.incidents.optionIncidentCount"
)}
fullWidth
error={!!errors.n}
helperText={errors.n ? errors.n.message : ""}
@@ -190,8 +192,8 @@ export const PageSpeedForm = ({
}
/>
<ConfigBox
title={t("notificationConfig.title")}
subtitle={t("notificationConfig.description")}
title={t("monitors.common.form.notifications.title")}
subtitle={t("monitors.common.form.notifications.description")}
rightContent={
<Stack>
<Controller
@@ -245,8 +247,8 @@ export const PageSpeedForm = ({
}
/>
<ConfigBox
title={t("createMonitorPage.intervalTitle")}
subtitle="How often to check the URL"
title={t("monitors.common.form.interval.title")}
subtitle={t("monitors.common.form.interval.description")}
rightContent={
<Controller
name="interval"
@@ -255,7 +257,7 @@ export const PageSpeedForm = ({
<TextInput
{...field}
type="text"
fieldLabel={t("createMonitorPage.intervalDescription")}
fieldLabel={t("monitors.common.form.interval.optionInterval")}
fullWidth
error={!!errors.interval}
helperText={errors.interval ? errors.interval.message : ""}
@@ -271,7 +273,7 @@ export const PageSpeedForm = ({
variant="contained"
color="primary"
>
{t("settingsSave")}
{t("common.buttons.save")}
</Button>
</Stack>
</BasePage>
@@ -85,7 +85,7 @@ export const PageSpeedMonitorTable = ({
return [
{
id: 1,
label: "Open site",
label: t("monitors.common.actions.openSite"),
action: () => {
window.open(monitor.url, "_blank", "noreferrer");
},
@@ -93,21 +93,21 @@ export const PageSpeedMonitorTable = ({
},
{
id: 2,
label: "Details",
label: t("monitors.common.actions.details"),
action: () => {
navigate(`${monitor._id}`);
},
},
{
id: 3,
label: "Incidents",
label: t("monitors.common.actions.incidents"),
action: () => {
navigate(`/incidents?monitorId=${monitor._id}`);
},
},
{
id: 4,
label: "Configure",
label: t("monitors.common.actions.configure"),
action: () => {
navigate(`/pagespeed/${monitor._id}/configure`);
},
@@ -116,12 +116,15 @@ export const PageSpeedMonitorTable = ({
// id: 5,
// label: "Clone",
// action: () => {
// },
// },
{
id: 6,
label: monitor.status === "paused" ? "Resume" : "Pause",
label:
monitor.status === "paused"
? t("common.buttons.resume")
: t("common.buttons.pause"),
action: async () => {
await patch(`/monitors/${monitor._id}/active`);
refetch();
@@ -130,7 +133,11 @@ export const PageSpeedMonitorTable = ({
},
{
id: 7,
label: <Typography color={theme.palette.error.main}>Remove</Typography>,
label: (
<Typography color={theme.palette.error.main}>
{t("common.buttons.delete")}
</Typography>
),
action: () => {
setSelectedMonitor(monitor);
},
@@ -163,7 +170,7 @@ export const PageSpeedMonitorTable = ({
onClick={(e) => handleSort(e, "name")}
sx={{ cursor: "pointer" }}
>
{t("host")}
{t("monitors.common.table.headers.name")}
{renderSortIcon(sortField === "name")}
</Stack>
),
@@ -182,7 +189,7 @@ export const PageSpeedMonitorTable = ({
onClick={(e) => handleSort(e, "status")}
sx={{ cursor: "pointer" }}
>
{t("status")}
{t("monitors.common.table.headers.status")}
{renderSortIcon(sortField === "status")}
</Stack>
),
@@ -192,7 +199,7 @@ export const PageSpeedMonitorTable = ({
},
{
id: "histogram",
content: "PageSpeed score",
content: t("monitors.common.table.headers.pageSpeedScore"),
render: (row) => {
return (
<Stack alignItems={"center"}>
@@ -207,7 +214,7 @@ export const PageSpeedMonitorTable = ({
{
id: "actions",
content: t("actions"),
content: t("monitors.common.table.headers.actions"),
render: (row) => {
return <ActionsMenu items={getActions(row)} />;
},
@@ -19,7 +19,6 @@ import useMediaQuery from "@mui/material/useMediaQuery";
import { useState } from "react";
import { useDelete } from "@/hooks/UseApi";
import { InitializingStatusBox } from "@/components/design-elements/StatusBox";
import { useAppSelector } from "@/hooks/AppHooks";
import { config } from "@/config/index";
import { useLimitReached } from "@/hooks/UsePlanEntitlements";
@@ -27,7 +26,6 @@ const GLOBAL_REFRESH = config.GLOBAL_REFRESH;
const PageSpeedMonitorsPage = () => {
const theme = useTheme();
const { user } = useAppSelector((state) => state.auth);
const { t } = useTranslation();
const isSmall = useMediaQuery(theme.breakpoints.down("md"));
@@ -91,8 +89,8 @@ const PageSpeedMonitorsPage = () => {
monitorLimitReached={monitorLimitReached}
>
<InfoBox
title="Website Performance Tracking"
description="Measure how fast your websites load and identify performance bottlenecks. Track Core Web Vitals and get actionable insights to improve user experience."
title={t("monitors.pageSpeed.infoBox.title")}
description={t("monitors.pageSpeed.infoBox.description")}
/>
<HeaderCreate
isLoading={loading}
@@ -124,8 +122,8 @@ const PageSpeedMonitorsPage = () => {
/>
<Dialog
open={isDialogOpen}
title={t("deleteDialogTitle")}
content={t("deleteDialogDescription")}
title={t("common.dialog.delete.title")}
content={t("common.dialog.delete.description")}
onConfirm={handleConfirm}
onCancel={handleCancel}
loading={isDeleting}
+4 -4
View File
@@ -16,14 +16,14 @@ const getHeaders = (t: Function, uiTimezone: string) => {
const headers: Header<ICheck>[] = [
{
id: "status",
content: t("status"),
content: t("monitors.common.table.headers.status"),
render: (row) => {
return <StatusLabel status={row.status as MonitorStatus} />;
},
},
{
id: "date",
content: t("date&Time"),
content: t("monitors.common.table.headers.dateTime"),
render: (row) => {
return formatDateWithTz(
row.createdAt,
@@ -34,14 +34,14 @@ const getHeaders = (t: Function, uiTimezone: string) => {
},
{
id: "message",
content: t("message"),
content: t("monitors.common.table.headers.message"),
render: (row) => {
return row.message || "N/A";
},
},
{
id: "statusCode",
content: t("statusCode"),
content: t("monitors.common.table.headers.statusCode"),
render: (row) => {
return row.httpStatusCode || "N/A";
},
+8 -7
View File
@@ -9,6 +9,7 @@ import {
import Stack from "@mui/material/Stack";
import { CheckTable } from "@/pages/uptime/CheckTable";
import { useTranslation } from "react-i18next";
import type { IMonitor, IMonitorWithMonitorStats } from "@/types/monitor";
import useMediaQuery from "@mui/material/useMediaQuery";
import { useTheme } from "@mui/material/styles";
@@ -25,7 +26,7 @@ const UptimeDetailsPage = () => {
const { id } = useParams();
const theme = useTheme();
const isSmall = useMediaQuery(theme.breakpoints.down("md"));
const { t } = useTranslation();
// Local state
const [range, setRange] = useState("2h");
@@ -113,13 +114,13 @@ const UptimeDetailsPage = () => {
<Stack direction={isSmall ? "column" : "row"} gap={theme.spacing(8)}>
<StatBox
palette={palette}
title="Active for"
title={t("monitors.common.stats.activeFor")}
subtitle={prettyMilliseconds(streakDuration, {
secondsDecimalDigits: 0,
})}
/>
<StatBox
title="Last check"
title={t("monitors.common.stats.lastCheck")}
subtitle={
lastChecked >= 0
? `${prettyMilliseconds(lastChecked, {
@@ -129,13 +130,13 @@ const UptimeDetailsPage = () => {
}
/>
<StatBox
title="Last response time"
title={t("monitors.common.stats.lastResponseTime")}
subtitle={
stats?.lastResponseTime ? `${stats?.lastResponseTime} ms` : "N/A"
}
/>
<StatBox
title="Certificate Expiry"
title={t("monitors.common.stats.certificate")}
subtitle={
stats?.certificateExpiry
? new Date(stats.certificateExpiry).toLocaleString()
@@ -150,13 +151,13 @@ const UptimeDetailsPage = () => {
/>
<Stack direction={isSmall ? "column" : "row"} gap={theme.spacing(8)}>
<HistogramStatus
title="Uptime"
title={t("common.charts.uptime.upTitle")}
status={"up"}
checks={upChecks}
range={range}
/>
<HistogramStatus
title="Incidents"
title={t("common.charts.uptime.downTitle")}
checks={downChecks}
status={"down"}
range={range}
+45 -31
View File
@@ -111,8 +111,8 @@ export const UptimeForm = ({
<BasePage component={"form"} onSubmit={handleSubmit(onSubmit)}>
{mode === "create" && (
<ConfigBox
title={t("distributedUptimeCreateChecks")}
subtitle={t("distributedUptimeCreateChecksDescription")}
title={t("monitors.uptime.form.type.title")}
subtitle={t("monitors.uptime.form.type.description")}
rightContent={
<Controller
name="type"
@@ -122,26 +122,31 @@ export const UptimeForm = ({
<RadioGroup {...field} sx={{ gap: theme.spacing(6) }}>
<RadioWithDescription
value="https"
label="HTTPS"
description="Use HTTPS to monitor your website or API endpoint.
"
label={t("monitors.common.form.optionHttps")}
description={t(
"monitors.uptime.form.type.optionHttpsDescription"
)}
/>
<RadioWithDescription
value="http"
label={"HTTP"}
description={
"Use HTTP to monitor your website or API endpoint."
}
label={t("monitors.common.form.optionHttp")}
description={t(
"monitors.uptime.form.type.optionHttpDescription"
)}
/>
<RadioWithDescription
value="port"
label={"Port"}
description={"Check whether your port is open or not."}
label={t("monitors.uptime.form.type.optionPort")}
description={t(
"monitors.uptime.form.type.optionPortDescription"
)}
/>
<RadioWithDescription
value="ping"
label={t("pingMonitoring")}
description={t("pingMonitoringDescription")}
label={t("monitors.uptime.form.type.optionPing")}
description={t(
"monitors.uptime.form.type.optionPingDescription"
)}
/>
</RadioGroup>
</FormControl>
@@ -151,8 +156,8 @@ export const UptimeForm = ({
/>
)}
<ConfigBox
title={t("settingsGeneralSettings")}
subtitle={t(`uptimeGeneralInstructions.${selectedType}`)}
title={t("monitors.common.form.general.title")}
subtitle={t(`monitors.uptime.form.general.description.${selectedType}`)}
rightContent={
<Stack gap={theme.spacing(8)}>
<Controller
@@ -173,7 +178,7 @@ export const UptimeForm = ({
}, 0);
}}
type="text"
fieldLabel={t("url")}
fieldLabel={t("monitors.common.form.optionUrl")}
fullWidth
error={!!errors.url}
helperText={errors.url ? errors.url.message : ""}
@@ -188,7 +193,7 @@ export const UptimeForm = ({
<TextInput
{...field}
type="number"
fieldLabel={"Port"}
fieldLabel={t("monitors.uptime.form.general.optionPort")}
fullWidth
error={!!errors.port}
helperText={errors.port ? errors.port.message : ""}
@@ -203,7 +208,7 @@ export const UptimeForm = ({
<TextInput
{...field}
type="text"
fieldLabel={t("displayName")}
fieldLabel={t("monitors.common.form.optionDisplayName")}
fullWidth
error={!!errors.name}
helperText={errors.name ? errors.name.message : ""}
@@ -214,8 +219,8 @@ export const UptimeForm = ({
}
/>
<ConfigBox
title={t("createMonitorPage.incidentConfigTitle")}
subtitle={t("createMonitorPage.incidentConfigDescriptionV2")}
title={t("monitors.common.form.incidents.title")}
subtitle={t("monitors.common.form.incidents.description")}
rightContent={
<Controller
name="n"
@@ -225,7 +230,7 @@ export const UptimeForm = ({
{...field}
type="number"
fieldLabel={t(
"createMonitorPage.incidentConfigStatusCheckNumber"
"monitors.common.form.incidents.optionIncidentCount"
)}
fullWidth
error={!!errors.n}
@@ -240,8 +245,8 @@ export const UptimeForm = ({
}
/>
<ConfigBox
title={t("notificationConfig.title")}
subtitle={t("notificationConfig.description")}
title={t("monitors.common.form.notifications.title")}
subtitle={t("monitors.common.form.notifications.description")}
rightContent={
<Stack>
<Controller
@@ -251,7 +256,12 @@ export const UptimeForm = ({
render={({ field }) => (
<AutoComplete
multiple
fieldLabel={`You have ${notificationOptions.length} available notification ${notificationOptions.length === 1 ? "channel" : "channels"}`}
fieldLabel={t(
"monitors.common.form.notifications.optionNotificationChannels",
{
count: notificationOptions.length,
}
)}
options={notificationOptions}
getOptionLabel={(option) => option.name}
value={notificationOptions.filter((o: any) =>
@@ -296,8 +306,8 @@ export const UptimeForm = ({
}
/>
<ConfigBox
title={t("createMonitorPage.intervalTitle")}
subtitle="How often to check the URL"
title={t("monitors.common.form.interval.title")}
subtitle={t("monitors.common.form.interval.description")}
rightContent={
<Controller
name="interval"
@@ -306,7 +316,7 @@ export const UptimeForm = ({
<TextInput
{...field}
type="text"
fieldLabel={t("createMonitorPage.intervalDescription")}
fieldLabel={t("monitors.common.form.interval.optionInterval")}
fullWidth
error={!!errors.interval}
helperText={errors.interval ? errors.interval.message : ""}
@@ -316,8 +326,8 @@ export const UptimeForm = ({
}
/>
<ConfigBox
title={t("createMonitorPage.rejectUnauthorizedTitle")}
subtitle={t("createMonitorPage.rejectUnauthorizedDescription")}
title={t("monitors.uptime.form.rejectUnauthorized.title")}
subtitle={t("monitors.uptime.form.rejectUnauthorized.description")}
rightContent={
<Controller
name="rejectUnauthorized"
@@ -326,7 +336,11 @@ export const UptimeForm = ({
<Stack direction="row" alignItems={"center"}>
<Switch {...field} checked={field.value} />
<Typography>
{field.value ? "Enabled (recommended)" : "Disabled"}
{field.value
? t("monitors.uptime.form.rejectUnauthorized.optionEnabled")
: t(
"monitors.uptime.form.rejectUnauthorized.optionDisabled"
)}
</Typography>
</Stack>
)}
@@ -340,7 +354,7 @@ export const UptimeForm = ({
variant="contained"
color="primary"
>
{t("settingsSave")}
{t("common.buttons.save")}
</Button>
</Stack>
</BasePage>
+4 -6
View File
@@ -27,7 +27,6 @@ import {
import useMediaQuery from "@mui/material/useMediaQuery";
import { useState } from "react";
import { useDelete } from "@/hooks/UseApi";
import { useAppSelector } from "@/hooks/AppHooks";
import { config } from "@/config/index";
import { useLimitReached } from "@/hooks/UsePlanEntitlements";
@@ -35,7 +34,6 @@ const GLOBAL_REFRESH = config.GLOBAL_REFRESH;
const UptimeMonitors = () => {
const theme = useTheme();
const { user } = useAppSelector((state) => state.auth);
const { t } = useTranslation();
const isSmall = useMediaQuery(theme.breakpoints.down("md"));
const [selectedMonitor, setSelectedMonitor] = useState<IMonitor | null>(null);
@@ -129,8 +127,8 @@ const UptimeMonitors = () => {
monitorLimitReached={monitorLimitReached}
>
<InfoBox
title="Website & API Uptime Monitoring"
description="Monitor your websites and APIs to ensure they're always accessible. Get instant alerts when your services go down and track uptime history over time."
title={t("monitors.uptime.infoBox.title")}
description={t("monitors.uptime.infoBox.description")}
/>
<HeaderCreate
isLoading={loading}
@@ -172,8 +170,8 @@ const UptimeMonitors = () => {
/>
<Dialog
open={isDialogOpen}
title={t("deleteDialogTitle")}
content={t("deleteDialogDescription")}
title={t("common.dialog.delete.title")}
content={t("common.dialog.delete.description")}
onConfirm={handleConfirm}
onCancel={handleCancel}
loading={isDeleting}
+25 -17
View File
@@ -16,6 +16,7 @@ import { usePatch } from "@/hooks/UseApi";
import type { IMonitor } from "@/types/monitor";
import type { ActionMenuItem } from "@/components/actions-menu";
import type { ChartType } from "@/features/uiSlice";
export const MonitorTable = ({
monitors,
@@ -47,6 +48,9 @@ export const MonitorTable = ({
const { t } = useTranslation();
const theme = useTheme();
const navigate = useNavigate();
const chartType = useAppSelector(
(state) => state?.ui?.chartType || "heatmap"
);
const {
patch,
// loading: isPatching,
@@ -85,7 +89,7 @@ export const MonitorTable = ({
return [
{
id: 1,
label: "Open site",
label: t("monitors.common.actions.openSite"),
action: () => {
window.open(monitor.url, "_blank", "noreferrer");
},
@@ -93,21 +97,21 @@ export const MonitorTable = ({
},
{
id: 2,
label: "Details",
label: t("monitors.common.actions.details"),
action: () => {
navigate(`${monitor._id}`);
},
},
{
id: 3,
label: "Incidents",
label: t("monitors.common.actions.incidents"),
action: () => {
navigate(`/incidents?monitorId=${monitor._id}`);
},
},
{
id: 4,
label: "Configure",
label: t("monitors.common.actions.configure"),
action: () => {
navigate(`/uptime/${monitor._id}/configure`);
},
@@ -116,12 +120,15 @@ export const MonitorTable = ({
// id: 5,
// label: "Clone",
// action: () => {
// },
// },
{
id: 6,
label: monitor.status === "paused" ? "Resume" : "Pause",
label:
monitor.status === "paused"
? t("common.buttons.resume")
: t("common.buttons.pause"),
action: async () => {
await patch(`/monitors/${monitor._id}/active`);
refetch();
@@ -130,7 +137,11 @@ export const MonitorTable = ({
},
{
id: 7,
label: <Typography color={theme.palette.error.main}>Remove</Typography>,
label: (
<Typography color={theme.palette.error.main}>
{t("common.buttons.delete")}
</Typography>
),
action: () => {
setSelectedMonitor(monitor);
},
@@ -139,10 +150,7 @@ export const MonitorTable = ({
];
};
const getHeaders = () => {
const chartType = useAppSelector(
(state) => state?.ui?.chartType || "heatmap"
);
const getHeaders = (chartType: ChartType) => {
const renderSortIcon = (isActive: boolean) => (
<Box width={16} display="inline-flex" justifyContent="center">
{isActive ? (
@@ -165,7 +173,7 @@ export const MonitorTable = ({
onClick={(e) => handleSort(e, "name")}
sx={{ cursor: "pointer" }}
>
{t("name")}
{t("monitors.common.table.headers.name")}
{renderSortIcon(sortField === "name")}
</Stack>
),
@@ -185,7 +193,7 @@ export const MonitorTable = ({
onClick={(e) => handleSort(e, "status")}
sx={{ cursor: "pointer" }}
>
{t("status")}
{t("monitors.common.table.headers.status")}
{renderSortIcon(sortField === "status")}
</Stack>
),
@@ -195,7 +203,7 @@ export const MonitorTable = ({
},
{
id: "histogram",
content: t("responseTime"),
content: t("monitors.common.table.headers.responseTime"),
render: (row) => {
if (chartType === "histogram") {
return <HistogramResponseTime checks={row.latestChecks} />;
@@ -215,7 +223,7 @@ export const MonitorTable = ({
onClick={(e) => handleSort(e, "type")}
sx={{ cursor: "pointer" }}
>
{t("type")}
{t("monitors.common.table.headers.type")}
{renderSortIcon(sortField === "type")}
</Stack>
),
@@ -225,7 +233,7 @@ export const MonitorTable = ({
},
{
id: "actions",
content: t("actions"),
content: t("monitors.common.table.headers.actions"),
render: (row) => {
return <ActionsMenu items={getActions(row)} />;
},
@@ -234,7 +242,7 @@ export const MonitorTable = ({
return headers;
};
const headers = getHeaders();
const headers = getHeaders(chartType);
return (
<Box>