strings
This commit is contained in:
1 parent
22f7d002fd
commit
c9dea5c0ae
23 files changed
+315
-131
No files matched your search
@@ -39,7 +39,7 @@ export const ChecksTable = ({
|
||||
const headers: Header<CheckWithMonitor>[] = [
|
||||
{
|
||||
id: "monitorName",
|
||||
content: t("incidentsTableMonitorName"),
|
||||
content: t("common.table.headers.monitor"),
|
||||
render: (row) => {
|
||||
return row.metadata?.monitorId?.name || "N/A";
|
||||
},
|
||||
@@ -53,7 +53,7 @@ export const ChecksTable = ({
|
||||
},
|
||||
{
|
||||
id: "date",
|
||||
content: "Date and time",
|
||||
content: t("checks.table.headers.dateTime"),
|
||||
render: (row) => {
|
||||
return formatDateWithTz(
|
||||
row.createdAt,
|
||||
@@ -64,7 +64,7 @@ export const ChecksTable = ({
|
||||
},
|
||||
{
|
||||
id: "statusCode",
|
||||
content: "Status code",
|
||||
content: t("checks.table.headers.statusCode"),
|
||||
render: (row) => {
|
||||
const code = row.httpStatusCode;
|
||||
const value =
|
||||
@@ -74,7 +74,7 @@ export const ChecksTable = ({
|
||||
},
|
||||
{
|
||||
id: "message",
|
||||
content: "Message",
|
||||
content: t("checks.table.headers.message"),
|
||||
render: (row) => {
|
||||
return row.message || "N/A";
|
||||
},
|
||||
|
||||
@@ -2,6 +2,7 @@ import { BasePage, StatBox } from "@/components/design-elements";
|
||||
import ResolutionCard from "@/components/design-elements/ResolutionCard";
|
||||
import Stack from "@mui/material/Stack";
|
||||
import Typography from "@mui/material/Typography";
|
||||
|
||||
import { useTheme } from "@mui/material/styles";
|
||||
import { useNavigate, useParams } from "react-router";
|
||||
import { useGet } from "@/hooks/UseApi";
|
||||
@@ -12,9 +13,11 @@ import { useAppSelector } from "@/hooks/AppHooks";
|
||||
import prettyMilliseconds from "pretty-ms";
|
||||
import { getMonitorPath } from "@/utils/MonitorUtils";
|
||||
import type { MonitorType } from "@/types/monitor";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
const IncidentDetailsPage = () => {
|
||||
const theme = useTheme();
|
||||
const { t } = useTranslation();
|
||||
const { id } = useParams<{ id: string }>();
|
||||
const uiTimezone = useAppSelector((state: any) => state.ui.timezone);
|
||||
const navigate = useNavigate();
|
||||
@@ -36,12 +39,12 @@ const IncidentDetailsPage = () => {
|
||||
<BasePage>
|
||||
<Stack spacing={theme.spacing(8)}>
|
||||
<Typography variant="h4" color="textPrimary">
|
||||
Incident Details
|
||||
{t("incidents.title")}
|
||||
</Typography>
|
||||
|
||||
<Stack direction={{ xs: "column", md: "row" }} gap={theme.spacing(8)}>
|
||||
<StatBox
|
||||
title="Monitor"
|
||||
title={t("monitors.common.stats.monitor")}
|
||||
subtitle={incident.monitorId?.name || "N/A"}
|
||||
onClick={() => {
|
||||
const type = incident.monitorId.type as MonitorType;
|
||||
@@ -51,7 +54,7 @@ const IncidentDetailsPage = () => {
|
||||
}}
|
||||
/>
|
||||
<StatBox
|
||||
title="Start"
|
||||
title={t("monitors.common.stats.start")}
|
||||
subtitle={formatDateWithTz(
|
||||
incident.startedAt,
|
||||
"ddd, MMMM D, YYYY, HH:mm A",
|
||||
@@ -59,7 +62,7 @@ const IncidentDetailsPage = () => {
|
||||
)}
|
||||
/>
|
||||
<StatBox
|
||||
title="End"
|
||||
title={t("monitors.common.stats.end")}
|
||||
subtitle={
|
||||
incident.endedAt
|
||||
? formatDateWithTz(
|
||||
@@ -67,7 +70,7 @@ const IncidentDetailsPage = () => {
|
||||
"ddd, MMMM D, YYYY, HH:mm A",
|
||||
uiTimezone
|
||||
)
|
||||
: "Ongoing"
|
||||
: t("monitors.common.stats.ongoing")
|
||||
}
|
||||
/>
|
||||
</Stack>
|
||||
@@ -79,12 +82,12 @@ const IncidentDetailsPage = () => {
|
||||
note={incident.resolutionNote}
|
||||
timestampLabel={
|
||||
incident.resolved && incident.endedAt
|
||||
? `Resolved at: ${formatDateWithTz(
|
||||
? `${t("incidents.details.resolutionCard.resolvedAt")}: ${formatDateWithTz(
|
||||
incident.endedAt,
|
||||
"ddd, MMMM D, YYYY, HH:mm A",
|
||||
uiTimezone
|
||||
)}`
|
||||
: `Ongoing since: ${formatDateWithTz(
|
||||
: `${t("incidents.details.resolutionCard.ongoingSince")}: ${formatDateWithTz(
|
||||
incident.startedAt,
|
||||
"ddd, MMMM D, YYYY, HH:mm A",
|
||||
uiTimezone
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import { Table, Pagination, ValueLabel, StatusLabel } from "@/components/design-elements";
|
||||
import {
|
||||
Table,
|
||||
Pagination,
|
||||
ValueLabel,
|
||||
StatusLabel,
|
||||
} from "@/components/design-elements";
|
||||
import Box from "@mui/material/Box";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import { Button } from "@/components/inputs";
|
||||
@@ -37,14 +42,14 @@ export const IncidentTable = ({
|
||||
const headers: Header<IIncident>[] = [
|
||||
{
|
||||
id: "name",
|
||||
content: t("incidentsTableMonitorName"),
|
||||
content: t("common.table.headers.monitor"),
|
||||
render: (row) => {
|
||||
return row.monitorId?.name || "N/A";
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "start",
|
||||
content: "Incident start",
|
||||
content: t("incidents.table.headers.start"),
|
||||
render: (row) => {
|
||||
return formatDateWithTz(
|
||||
row.startedAt,
|
||||
@@ -55,7 +60,7 @@ export const IncidentTable = ({
|
||||
},
|
||||
{
|
||||
id: "end",
|
||||
content: "Incident end",
|
||||
content: t("incidents.table.headers.end"),
|
||||
render: (row) => {
|
||||
return row.endedAt
|
||||
? formatDateWithTz(
|
||||
@@ -68,7 +73,7 @@ export const IncidentTable = ({
|
||||
},
|
||||
{
|
||||
id: "status",
|
||||
content: "Current monitor status",
|
||||
content: t("incidents.table.headers.monitorStatus"),
|
||||
render: (row) => {
|
||||
const status = row.monitorId?.status;
|
||||
return status ? (
|
||||
@@ -80,7 +85,7 @@ export const IncidentTable = ({
|
||||
},
|
||||
{
|
||||
id: "resolved",
|
||||
content: "Resolved",
|
||||
content: t("incidents.table.headers.resolved"),
|
||||
render: (row) => {
|
||||
return (
|
||||
<ValueLabel
|
||||
@@ -92,21 +97,21 @@ export const IncidentTable = ({
|
||||
},
|
||||
{
|
||||
id: "resolutionType",
|
||||
content: "Resolution type",
|
||||
content: t("incidents.table.headers.resolutionType"),
|
||||
render: (row) => {
|
||||
return row.resolutionType || "N/A";
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "resolvedBy",
|
||||
content: "Resolved by",
|
||||
content: t("incidents.table.headers.resolvedBy"),
|
||||
render: (row) => {
|
||||
return row.resolvedBy?.email || "N/A";
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "actions",
|
||||
content: "Actions",
|
||||
content: t("common.table.headers.actions"),
|
||||
render: (row) => {
|
||||
return row.resolved ? null : (
|
||||
<Button
|
||||
@@ -121,7 +126,7 @@ export const IncidentTable = ({
|
||||
variant="contained"
|
||||
color="primary"
|
||||
>
|
||||
Resolve
|
||||
{t("common.buttons.resolve")}
|
||||
</Button>
|
||||
);
|
||||
},
|
||||
|
||||
@@ -168,7 +168,7 @@ export const InfraMonitorsTable = ({
|
||||
onClick={(e) => handleSort(e, "name")}
|
||||
sx={{ cursor: "pointer" }}
|
||||
>
|
||||
{t("monitors.common.table.headers.name")}
|
||||
{t("common.table.headers.name")}
|
||||
{renderSortIcon(sortField === "name")}
|
||||
</Typography>
|
||||
),
|
||||
@@ -186,7 +186,7 @@ export const InfraMonitorsTable = ({
|
||||
onClick={(e) => handleSort(e, "status")}
|
||||
sx={{ cursor: "pointer" }}
|
||||
>
|
||||
{t("monitors.common.table.headers.status")}
|
||||
{t("common.table.headers.status")}
|
||||
{renderSortIcon(sortField === "status")}
|
||||
</Typography>
|
||||
),
|
||||
@@ -196,7 +196,7 @@ export const InfraMonitorsTable = ({
|
||||
},
|
||||
{
|
||||
id: "cpu",
|
||||
content: t("monitors.common.table.headers.cpu"),
|
||||
content: t("monitors.infrastructure.table.headers.cpu"),
|
||||
render: (row) => {
|
||||
const cpuUsage =
|
||||
(row.latestChecks?.[0]?.system?.cpu?.usage_percent || 0) * 100;
|
||||
@@ -205,7 +205,7 @@ export const InfraMonitorsTable = ({
|
||||
},
|
||||
{
|
||||
id: "memory",
|
||||
content: t("monitors.common.table.headers.memory"),
|
||||
content: t("monitors.infrastructure.table.headers.memory"),
|
||||
render: (row) => {
|
||||
const memoryUsage =
|
||||
(row.latestChecks?.[0]?.system?.memory?.usage_percent || 0) * 100;
|
||||
@@ -214,7 +214,7 @@ export const InfraMonitorsTable = ({
|
||||
},
|
||||
{
|
||||
id: "disk",
|
||||
content: t("monitors.common.table.headers.disk"),
|
||||
content: t("monitors.infrastructure.table.headers.disk"),
|
||||
render: (row) => {
|
||||
const totalDiskUsage = row.latestChecks?.[0]?.system?.disk?.reduce(
|
||||
(acc, disk) => acc + disk.usage_percent,
|
||||
@@ -228,7 +228,7 @@ export const InfraMonitorsTable = ({
|
||||
|
||||
{
|
||||
id: "actions",
|
||||
content: t("monitors.common.table.headers.actions"),
|
||||
content: t("common.table.headers.actions"),
|
||||
render: (row) => {
|
||||
return <ActionsMenu items={getActions(row)} />;
|
||||
},
|
||||
|
||||
@@ -82,14 +82,14 @@ const MaintenancePage = () => {
|
||||
const headers: Header<IMaintenance>[] = [
|
||||
{
|
||||
id: "name",
|
||||
content: "Name",
|
||||
content: t("common.table.headers.name"),
|
||||
render: (row) => {
|
||||
return <Typography>{row?.name}</Typography>;
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "active",
|
||||
content: "Active",
|
||||
content: t("common.table.headers.active"),
|
||||
render: (row) => {
|
||||
const active = row.isActive ? "Yes" : "No";
|
||||
return <Typography>{active}</Typography>;
|
||||
@@ -97,7 +97,7 @@ const MaintenancePage = () => {
|
||||
},
|
||||
{
|
||||
id: "repeat",
|
||||
content: "Repeat",
|
||||
content: t("maintenanceWindow.table.headers.repeat"),
|
||||
render: (row) => {
|
||||
const active = row.repeat ? row.repeat : "No";
|
||||
return <Typography textTransform={"capitalize"}>{active}</Typography>;
|
||||
@@ -105,7 +105,7 @@ const MaintenancePage = () => {
|
||||
},
|
||||
{
|
||||
id: "actions",
|
||||
content: t("actions"),
|
||||
content: t("common.table.headers.actions"),
|
||||
render: (row) => {
|
||||
return <ActionsMenu items={getActions(row)} />;
|
||||
},
|
||||
@@ -124,11 +124,11 @@ const MaintenancePage = () => {
|
||||
items={maintenance}
|
||||
bullets={t("maintenanceWindow.fallback.checks", { returnObjects: true })}
|
||||
actionLink="/maintenance/create"
|
||||
actionButtonText={t("createMaintenanceWindow")}
|
||||
actionButtonText={t("maintenanceWindow.fallback.actionButton")}
|
||||
>
|
||||
<InfoBox
|
||||
title="Scheduled Maintenance Periods"
|
||||
description="Plan maintenance windows to temporarily pause monitoring checks. During maintenance, your monitors won't run checks or send notifications, preventing false alerts during planned downtime."
|
||||
title={t("maintenanceWindow.infoBox.title")}
|
||||
description={t("maintenanceWindow.infoBox.description")}
|
||||
/>
|
||||
<HeaderCreate
|
||||
label={"Create a new maintenance window"}
|
||||
@@ -146,8 +146,8 @@ const MaintenancePage = () => {
|
||||
/>
|
||||
|
||||
<Dialog
|
||||
title={t("createNotifications.dialogDeleteTitle")}
|
||||
content={t("createNotifications.dialogDeleteContent")}
|
||||
title={t("common.dialog.delete.title")}
|
||||
content={t("common.dialog.delete.description")}
|
||||
open={open}
|
||||
onConfirm={handleConfirm}
|
||||
onCancel={handleCancel}
|
||||
|
||||
@@ -57,12 +57,12 @@ export const MaintenanceForm = ({
|
||||
return (
|
||||
<BasePage component={"form"} onSubmit={handleSubmit(onSubmit, onError)}>
|
||||
<InfoBox
|
||||
title="About Maintenance Windows"
|
||||
description="During maintenance windows, all monitoring is suspended for selected monitors. No network checks will be performed, preventing any status updates or notifications from being triggered. Your monitors will appear frozen at their last known status, and status pages will display a maintenance indicator. Once the maintenance window ends, monitoring automatically resumes, and alerts will trigger if issues are detected. Maintenance periods do not count against uptime calculations."
|
||||
title={t("maintenanceWindow.infoBox.title")}
|
||||
description={t("maintenanceWindow.infoBox.description")}
|
||||
/>
|
||||
<ConfigBox
|
||||
title={t("createMaintenanceWindowPage.generalSettingsTitle")}
|
||||
subtitle={t("createMaintenanceWindowPage.generalSettingsDescription")}
|
||||
title={t("maintenanceWindow.form.general.title")}
|
||||
subtitle={t("maintenanceWindow.form.general.description")}
|
||||
rightContent={
|
||||
<Stack spacing={theme.spacing(8)}>
|
||||
<Controller
|
||||
@@ -71,13 +71,11 @@ export const MaintenanceForm = ({
|
||||
render={({ field }) => (
|
||||
<TextInput
|
||||
{...field}
|
||||
fieldLabel={t(
|
||||
"createMaintenanceWindowPage.generalSettingsName"
|
||||
)}
|
||||
fieldLabel={t("maintenanceWindow.form.general.optionName")}
|
||||
required
|
||||
type="text"
|
||||
placeholder={t(
|
||||
"createMaintenanceWindowPage.generalSettingsNamePlaceholder"
|
||||
"maintenanceWindow.form.general.optionNamePlaceholder"
|
||||
)}
|
||||
fullWidth
|
||||
error={!!errors.name}
|
||||
@@ -91,9 +89,7 @@ export const MaintenanceForm = ({
|
||||
render={({ field }) => (
|
||||
<Select
|
||||
value={field.value || ""}
|
||||
fieldLabel={t(
|
||||
"createMaintenanceWindowPage.generalSettingsRepeat"
|
||||
)}
|
||||
fieldLabel={t("maintenanceWindow.form.general.optionRepeat")}
|
||||
required
|
||||
error={!!errors.repeat}
|
||||
onChange={field.onChange}
|
||||
@@ -115,8 +111,8 @@ export const MaintenanceForm = ({
|
||||
}
|
||||
/>
|
||||
<ConfigBox
|
||||
title={t("createMaintenanceWindowPage.timingSettingsTitle")}
|
||||
subtitle={t("createMaintenanceWindowPage.timingSettingsDescription")}
|
||||
title={t("maintenanceWindow.form.time.title")}
|
||||
subtitle={t("maintenanceWindow.form.time.description")}
|
||||
rightContent={
|
||||
<Stack spacing={theme.spacing(8)}>
|
||||
<Controller
|
||||
@@ -128,7 +124,7 @@ export const MaintenanceForm = ({
|
||||
<>
|
||||
<DateTimePicker
|
||||
{...field}
|
||||
fieldLabel="Start time"
|
||||
fieldLabel={t("maintenanceWindow.form.time.optionStart")}
|
||||
required
|
||||
value={value}
|
||||
onChange={(val: Dayjs | null) =>
|
||||
@@ -153,7 +149,7 @@ export const MaintenanceForm = ({
|
||||
<>
|
||||
<DateTimePicker
|
||||
{...field}
|
||||
fieldLabel="End time"
|
||||
fieldLabel={t("maintenanceWindow.form.time.optionEnd")}
|
||||
required
|
||||
value={value}
|
||||
onChange={(val: Dayjs | null) =>
|
||||
@@ -173,8 +169,8 @@ export const MaintenanceForm = ({
|
||||
}
|
||||
/>
|
||||
<ConfigBox
|
||||
title={t("createMaintenanceWindowPage.monitorsTitle")}
|
||||
subtitle={t("createMaintenanceWindowPage.monitorsDescription")}
|
||||
title={t("maintenanceWindow.form.monitors.title")}
|
||||
subtitle={t("maintenanceWindow.form.monitors.description")}
|
||||
rightContent={
|
||||
<Controller
|
||||
name="monitors"
|
||||
@@ -189,7 +185,9 @@ export const MaintenanceForm = ({
|
||||
return (
|
||||
<AutoComplete
|
||||
multiple
|
||||
fieldLabel="Monitors"
|
||||
fieldLabel={t(
|
||||
"maintenanceWindow.form.monitors.optionMonitors"
|
||||
)}
|
||||
required
|
||||
options={monitorOptions}
|
||||
getOptionLabel={(option) => option.name}
|
||||
@@ -201,7 +199,11 @@ export const MaintenanceForm = ({
|
||||
<TextInput
|
||||
{...params}
|
||||
placeholder={
|
||||
count > 0 ? `${count} selected` : "Type to search"
|
||||
count > 0
|
||||
? `${count} ${t("maintenanceWindow.form.monitors.optionMonitorsSelected")}`
|
||||
: t(
|
||||
"maintenanceWindow.form.monitors.optionMonitorsPlaceholder"
|
||||
)
|
||||
}
|
||||
/>
|
||||
)}
|
||||
@@ -219,7 +221,7 @@ export const MaintenanceForm = ({
|
||||
variant="contained"
|
||||
color="primary"
|
||||
>
|
||||
{t("settingsSave")}
|
||||
{t("common.buttons.save")}
|
||||
</Button>
|
||||
</Stack>
|
||||
</BasePage>
|
||||
|
||||
@@ -91,14 +91,14 @@ const NotificationChannelsPage = () => {
|
||||
const headers: Header<INotificationChannel>[] = [
|
||||
{
|
||||
id: "name",
|
||||
content: t("monitors.common.table.headers.name"),
|
||||
content: t("common.table.headers.name"),
|
||||
render: (row) => {
|
||||
return <Typography>{row?.name}</Typography>;
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "active",
|
||||
content: t("monitors.common.table.headers.active"),
|
||||
content: t("common.table.headers.active"),
|
||||
render: (row) => {
|
||||
const active = row.isActive
|
||||
? t("common.buttons.yes")
|
||||
@@ -108,7 +108,7 @@ const NotificationChannelsPage = () => {
|
||||
},
|
||||
{
|
||||
id: "type",
|
||||
content: "Type",
|
||||
content: t("common.table.headers.type"),
|
||||
render: (row) => {
|
||||
return (
|
||||
<Typography textTransform={"capitalize"}>{row?.type}</Typography>
|
||||
@@ -117,7 +117,7 @@ const NotificationChannelsPage = () => {
|
||||
},
|
||||
{
|
||||
id: "actions",
|
||||
content: t("monitors.common.table.headers.actions"),
|
||||
content: t("common.table.headers.actions"),
|
||||
render: (row) => {
|
||||
return <ActionsMenu items={getActions(row)} />;
|
||||
},
|
||||
|
||||
@@ -170,7 +170,7 @@ export const PageSpeedMonitorTable = ({
|
||||
onClick={(e) => handleSort(e, "name")}
|
||||
sx={{ cursor: "pointer" }}
|
||||
>
|
||||
{t("monitors.common.table.headers.name")}
|
||||
{t("common.table.headers.name")}
|
||||
{renderSortIcon(sortField === "name")}
|
||||
</Stack>
|
||||
),
|
||||
@@ -189,7 +189,7 @@ export const PageSpeedMonitorTable = ({
|
||||
onClick={(e) => handleSort(e, "status")}
|
||||
sx={{ cursor: "pointer" }}
|
||||
>
|
||||
{t("monitors.common.table.headers.status")}
|
||||
{t("common.table.headers.status")}
|
||||
{renderSortIcon(sortField === "status")}
|
||||
</Stack>
|
||||
),
|
||||
@@ -199,7 +199,7 @@ export const PageSpeedMonitorTable = ({
|
||||
},
|
||||
{
|
||||
id: "histogram",
|
||||
content: t("monitors.common.table.headers.pageSpeedScore"),
|
||||
content: t("monitors.pageSpeed.table.headers.pageSpeedScore"),
|
||||
render: (row) => {
|
||||
return (
|
||||
<Stack alignItems={"center"}>
|
||||
@@ -214,7 +214,7 @@ export const PageSpeedMonitorTable = ({
|
||||
|
||||
{
|
||||
id: "actions",
|
||||
content: t("monitors.common.table.headers.actions"),
|
||||
content: t("common.table.headers.actions"),
|
||||
render: (row) => {
|
||||
return <ActionsMenu items={getActions(row)} />;
|
||||
},
|
||||
|
||||
@@ -66,8 +66,8 @@ export const StatusPageForm = ({
|
||||
return (
|
||||
<BasePage component={"form"} onSubmit={handleSubmit(onSubmit, onError)}>
|
||||
<ConfigBox
|
||||
title={t("createStatusPage.basicConfigTitle")}
|
||||
subtitle={t("createStatusPage.basicConfigDescription")}
|
||||
title={t("statusPage.form.basic.title")}
|
||||
subtitle={t("statusPage.form.basic.description")}
|
||||
rightContent={
|
||||
<Stack gap={theme.spacing(8)}>
|
||||
<Controller
|
||||
@@ -77,7 +77,7 @@ export const StatusPageForm = ({
|
||||
<TextInput
|
||||
{...field}
|
||||
type="text"
|
||||
fieldLabel={t("createStatusPage.nameConfigLabel")}
|
||||
fieldLabel={t("statusPage.form.basic.optionName")}
|
||||
fullWidth
|
||||
error={!!errors.name}
|
||||
helperText={errors.name ? errors.name.message : ""}
|
||||
@@ -91,7 +91,7 @@ export const StatusPageForm = ({
|
||||
<TextInput
|
||||
{...field}
|
||||
type="text"
|
||||
fieldLabel={t("createStatusPage.descriptionConfigLabel")}
|
||||
fieldLabel={t("statusPage.form.basic.optionDescription")}
|
||||
fullWidth
|
||||
error={!!errors.description}
|
||||
helperText={
|
||||
@@ -104,8 +104,8 @@ export const StatusPageForm = ({
|
||||
}
|
||||
/>
|
||||
<ConfigBox
|
||||
title={t("createStatusPage.urlConfigTitle")}
|
||||
subtitle={t("createStatusPage.urlConfigDescription")}
|
||||
title={t("statusPage.form.url.title")}
|
||||
subtitle={t("statusPage.form.url.description")}
|
||||
rightContent={
|
||||
<Controller
|
||||
name="url"
|
||||
@@ -114,7 +114,7 @@ export const StatusPageForm = ({
|
||||
<TextInput
|
||||
{...field}
|
||||
type="text"
|
||||
fieldLabel={t("createStatusPage.urlConfigTitle")}
|
||||
fieldLabel={t("statusPage.form.url.optionUrl")}
|
||||
fullWidth
|
||||
error={!!errors.url}
|
||||
helperText={errors.url ? errors.url.message : ""}
|
||||
@@ -124,15 +124,15 @@ export const StatusPageForm = ({
|
||||
}
|
||||
/>
|
||||
<ConfigBox
|
||||
title={t("createStatusPage.accessConfigTitle")}
|
||||
subtitle={t("createStatusPage.accessConfigDescription")}
|
||||
title={t("statusPage.form.access.title")}
|
||||
subtitle={t("statusPage.form.access.description")}
|
||||
rightContent={
|
||||
<Controller
|
||||
name="isPublished"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<FormControlLabel
|
||||
label={t("createStatusPage.publishedConfigLabel")}
|
||||
label={t("statusPage.form.access.optionPublished")}
|
||||
control={
|
||||
<Checkbox
|
||||
{...field}
|
||||
@@ -146,8 +146,8 @@ export const StatusPageForm = ({
|
||||
}
|
||||
/>
|
||||
<ConfigBox
|
||||
title={t("createMaintenanceWindowPage.monitorsTitle")}
|
||||
subtitle={t("createMaintenanceWindowPage.monitorsDescription")}
|
||||
title={t("statusPage.form.monitors.title")}
|
||||
subtitle={t("statusPage.form.monitors.description")}
|
||||
rightContent={
|
||||
<Stack>
|
||||
<Controller
|
||||
@@ -205,7 +205,7 @@ export const StatusPageForm = ({
|
||||
variant="contained"
|
||||
color="primary"
|
||||
>
|
||||
{t("settingsSave")}
|
||||
{t("common.buttons.save")}
|
||||
</Button>
|
||||
</Stack>
|
||||
</BasePage>
|
||||
|
||||
@@ -72,14 +72,14 @@ export const StatusPageTable = ({
|
||||
const headers: Header<IStatusPage>[] = [
|
||||
{
|
||||
id: "name",
|
||||
content: "Name",
|
||||
content: t("common.table.headers.name"),
|
||||
render: (row) => {
|
||||
return <Typography>{row?.name}</Typography>;
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "published",
|
||||
content: "Published",
|
||||
content: t("statusPage.table.headers.published"),
|
||||
render: (row) => {
|
||||
const published = row.isPublished ? "Yes" : "No";
|
||||
return <Typography>{published}</Typography>;
|
||||
@@ -87,7 +87,7 @@ export const StatusPageTable = ({
|
||||
},
|
||||
{
|
||||
id: "url",
|
||||
content: "Public URL",
|
||||
content: t("statusPage.table.headers.publicUrl"),
|
||||
render: (row) => {
|
||||
return (
|
||||
<Typography textTransform={"capitalize"}>{row?.url}</Typography>
|
||||
@@ -96,7 +96,7 @@ export const StatusPageTable = ({
|
||||
},
|
||||
{
|
||||
id: "actions",
|
||||
content: t("actions"),
|
||||
content: t("common.table.headers.actions"),
|
||||
render: (row) => {
|
||||
return <ActionsMenu items={getActions(row)} />;
|
||||
},
|
||||
|
||||
@@ -73,8 +73,8 @@ const StatusPages = () => {
|
||||
/>
|
||||
|
||||
<Dialog
|
||||
title={t("createStatusPage.dialogDeleteTitle")}
|
||||
content={t("createStatusPage.dialogDeleteContent")}
|
||||
title={t("common.dialog.delete.title")}
|
||||
content={t("common.dialog.delete.description")}
|
||||
open={open}
|
||||
onConfirm={handleConfirm}
|
||||
onCancel={handleCancel}
|
||||
|
||||
@@ -173,7 +173,7 @@ export const MonitorTable = ({
|
||||
onClick={(e) => handleSort(e, "name")}
|
||||
sx={{ cursor: "pointer" }}
|
||||
>
|
||||
{t("monitors.common.table.headers.name")}
|
||||
{t("common.table.headers.name")}
|
||||
{renderSortIcon(sortField === "name")}
|
||||
</Stack>
|
||||
),
|
||||
@@ -193,7 +193,7 @@ export const MonitorTable = ({
|
||||
onClick={(e) => handleSort(e, "status")}
|
||||
sx={{ cursor: "pointer" }}
|
||||
>
|
||||
{t("monitors.common.table.headers.status")}
|
||||
{t("common.table.headers.status")}
|
||||
{renderSortIcon(sortField === "status")}
|
||||
</Stack>
|
||||
),
|
||||
@@ -203,7 +203,7 @@ export const MonitorTable = ({
|
||||
},
|
||||
{
|
||||
id: "histogram",
|
||||
content: t("monitors.common.table.headers.responseTime"),
|
||||
content: t("monitors.uptime.table.headers.responseTime"),
|
||||
render: (row) => {
|
||||
if (chartType === "histogram") {
|
||||
return <HistogramResponseTime checks={row.latestChecks} />;
|
||||
@@ -223,7 +223,7 @@ export const MonitorTable = ({
|
||||
onClick={(e) => handleSort(e, "type")}
|
||||
sx={{ cursor: "pointer" }}
|
||||
>
|
||||
{t("monitors.common.table.headers.type")}
|
||||
{t("common.table.headers.type")}
|
||||
{renderSortIcon(sortField === "type")}
|
||||
</Stack>
|
||||
),
|
||||
@@ -233,7 +233,7 @@ export const MonitorTable = ({
|
||||
},
|
||||
{
|
||||
id: "actions",
|
||||
content: t("monitors.common.table.headers.actions"),
|
||||
content: t("common.table.headers.actions"),
|
||||
render: (row) => {
|
||||
return <ActionsMenu items={getActions(row)} />;
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user