This commit is contained in:
Alex Holliday committed 2025-12-12 10:54:26 -08:00
1 parent 22f7d002fd
commit c9dea5c0ae
23 files changed
+315 -131

No files matched your search

+9 -9
View File
@@ -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>