Merge branch 'develop' into settings-zod-schema
This commit is contained in:
commit
cd501e46cd
62 files changed
+463
-1888
No files matched your search
@@ -97,27 +97,27 @@ const SetNewPasswordPage = () => {
|
||||
/>
|
||||
<Stack gap={theme.spacing(4)}>
|
||||
<BulletPointCheck
|
||||
text={t("auth.common.passwordRules.length")}
|
||||
text={t("pages.auth.common.passwordRules.length")}
|
||||
variant={getVariant(hasLength)}
|
||||
/>
|
||||
<BulletPointCheck
|
||||
text={t("auth.common.passwordRules.special")}
|
||||
text={t("pages.auth.common.passwordRules.special")}
|
||||
variant={getVariant(hasSpecial)}
|
||||
/>
|
||||
<BulletPointCheck
|
||||
text={t("auth.common.passwordRules.number")}
|
||||
text={t("pages.auth.common.passwordRules.number")}
|
||||
variant={getVariant(hasNumber)}
|
||||
/>
|
||||
<BulletPointCheck
|
||||
text={t("auth.common.passwordRules.uppercase")}
|
||||
text={t("pages.auth.common.passwordRules.uppercase")}
|
||||
variant={getVariant(hasUppercase)}
|
||||
/>
|
||||
<BulletPointCheck
|
||||
text={t("auth.common.passwordRules.lowercase")}
|
||||
text={t("pages.auth.common.passwordRules.lowercase")}
|
||||
variant={getVariant(hasLowercase)}
|
||||
/>
|
||||
<BulletPointCheck
|
||||
text={t("auth.common.passwordRules.match")}
|
||||
text={t("pages.auth.common.passwordRules.match")}
|
||||
variant={getVariant(passwordsMatch)}
|
||||
/>
|
||||
</Stack>
|
||||
@@ -127,7 +127,7 @@ const SetNewPasswordPage = () => {
|
||||
fullWidth
|
||||
loading={loading}
|
||||
>
|
||||
{t("auth.forgotPassword.buttons.resetPassword")}
|
||||
{t("common.buttons.resetPassword")}
|
||||
</Button>
|
||||
<TextLink
|
||||
alignSelf="center"
|
||||
|
||||
@@ -329,11 +329,16 @@ const CreateMonitorPage = () => {
|
||||
render={({ field, fieldState }) => (
|
||||
<TextField
|
||||
{...field}
|
||||
value={field.value ?? ""}
|
||||
onChange={(e) => field.onChange(Number(e.target.value) || 0)}
|
||||
value={field.value === 0 ? "" : field.value}
|
||||
onChange={(e) => {
|
||||
const val = e.target.value;
|
||||
field.onChange(val === "" ? 0 : Number(val));
|
||||
}}
|
||||
type="number"
|
||||
fieldLabel={t("portToMonitor")}
|
||||
placeholder="5173"
|
||||
fieldLabel={t("pages.createMonitor.form.general.option.port.label")}
|
||||
placeholder={t(
|
||||
"pages.createMonitor.form.general.option.port.placeholder"
|
||||
)}
|
||||
fullWidth
|
||||
error={!!fieldState.error}
|
||||
helperText={fieldState.error?.message ?? ""}
|
||||
@@ -351,10 +356,12 @@ const CreateMonitorPage = () => {
|
||||
<Select
|
||||
{...field}
|
||||
value={field.value ?? ""}
|
||||
fieldLabel={t("chooseGame")}
|
||||
fieldLabel={t("pages.createMonitor.form.general.option.game.label")}
|
||||
error={!!fieldState.error}
|
||||
>
|
||||
<MenuItem value="">Select a game</MenuItem>
|
||||
<MenuItem value="">
|
||||
{t("pages.createMonitor.form.general.option.game.placeholder")}{" "}
|
||||
</MenuItem>
|
||||
{games &&
|
||||
Object.entries(games).map(([key, game]) => (
|
||||
<MenuItem
|
||||
@@ -426,22 +433,146 @@ const CreateMonitorPage = () => {
|
||||
)}
|
||||
error={!!fieldState.error}
|
||||
>
|
||||
<MenuItem value={15000}>{t("time.fifteenSeconds")}</MenuItem>
|
||||
<MenuItem value={30000}>{t("time.thirtySeconds")}</MenuItem>
|
||||
<MenuItem value={60000}>{t("time.oneMinute")}</MenuItem>
|
||||
<MenuItem value={120000}>{t("time.twoMinutes")}</MenuItem>
|
||||
<MenuItem value={180000}>{t("time.threeMinutes")}</MenuItem>
|
||||
<MenuItem value={240000}>{t("time.fourMinutes")}</MenuItem>
|
||||
<MenuItem value={300000}>{t("time.fiveMinutes")}</MenuItem>
|
||||
<MenuItem value={600000}>{t("time.tenMinutes")}</MenuItem>
|
||||
<MenuItem value={900000}>{t("time.fifteenMinutes")}</MenuItem>
|
||||
<MenuItem value={1800000}>{t("time.thirtyMinutes")}</MenuItem>
|
||||
<MenuItem value={15000}>
|
||||
{t(
|
||||
"pages.createMonitor.form.frequency.option.frequency.value.fifteenSeconds"
|
||||
)}
|
||||
</MenuItem>
|
||||
<MenuItem value={30000}>
|
||||
{t(
|
||||
"pages.createMonitor.form.frequency.option.frequency.value.thirtySeconds"
|
||||
)}
|
||||
</MenuItem>
|
||||
<MenuItem value={60000}>
|
||||
{t(
|
||||
"pages.createMonitor.form.frequency.option.frequency.value.oneMinute"
|
||||
)}
|
||||
</MenuItem>
|
||||
<MenuItem value={120000}>
|
||||
{t(
|
||||
"pages.createMonitor.form.frequency.option.frequency.value.twoMinutes"
|
||||
)}
|
||||
</MenuItem>
|
||||
<MenuItem value={180000}>
|
||||
{t(
|
||||
"pages.createMonitor.form.frequency.option.frequency.value.threeMinutes"
|
||||
)}
|
||||
</MenuItem>
|
||||
<MenuItem value={240000}>
|
||||
{t(
|
||||
"pages.createMonitor.form.frequency.option.frequency.value.fourMinutes"
|
||||
)}
|
||||
</MenuItem>
|
||||
<MenuItem value={300000}>
|
||||
{t(
|
||||
"pages.createMonitor.form.frequency.option.frequency.value.fiveMinutes"
|
||||
)}
|
||||
</MenuItem>
|
||||
<MenuItem value={600000}>
|
||||
{t(
|
||||
"pages.createMonitor.form.frequency.option.frequency.value.tenMinutes"
|
||||
)}
|
||||
</MenuItem>
|
||||
<MenuItem value={900000}>
|
||||
{t(
|
||||
"pages.createMonitor.form.frequency.option.frequency.value.fifteenMinutes"
|
||||
)}
|
||||
</MenuItem>
|
||||
<MenuItem value={1800000}>
|
||||
{t(
|
||||
"pages.createMonitor.form.frequency.option.frequency.value.thirtyMinutes"
|
||||
)}
|
||||
</MenuItem>
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
{/* Alert Thresholds - only for hardware type */}
|
||||
{generalSettingsConfig.showSecret && (
|
||||
<ConfigBox
|
||||
title={t("pages.createMonitor.form.thresholds.title")}
|
||||
subtitle={t("pages.createMonitor.form.thresholds.description")}
|
||||
rightContent={
|
||||
<Stack spacing={theme.spacing(8)}>
|
||||
<Controller
|
||||
name="cpuAlertThreshold"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<SliderWithLabel
|
||||
{...field}
|
||||
sliderMaxWidth={{ xs: "100%", md: "50%" }}
|
||||
fieldLabel={t(
|
||||
"pages.createMonitor.form.thresholds.option.cpuThreshold.label"
|
||||
)}
|
||||
min={0}
|
||||
max={100}
|
||||
step={1}
|
||||
valueLabelDisplay="auto"
|
||||
valueLabelFormat={(value) => `${value}%`}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
<Controller
|
||||
name="memoryAlertThreshold"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<SliderWithLabel
|
||||
{...field}
|
||||
sliderMaxWidth={{ xs: "100%", md: "50%" }}
|
||||
fieldLabel={t(
|
||||
"pages.createMonitor.form.thresholds.option.memoryThreshold.label"
|
||||
)}
|
||||
min={0}
|
||||
max={100}
|
||||
step={1}
|
||||
valueLabelDisplay="auto"
|
||||
valueLabelFormat={(value) => `${value}%`}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
<Controller
|
||||
name="diskAlertThreshold"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<SliderWithLabel
|
||||
{...field}
|
||||
sliderMaxWidth={{ xs: "100%", md: "50%" }}
|
||||
fieldLabel={t(
|
||||
"pages.createMonitor.form.thresholds.option.diskThreshold.label"
|
||||
)}
|
||||
min={0}
|
||||
max={100}
|
||||
step={1}
|
||||
valueLabelDisplay="auto"
|
||||
valueLabelFormat={(value) => `${value}%`}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
<Controller
|
||||
name="tempAlertThreshold"
|
||||
control={control}
|
||||
render={({ field }) => (
|
||||
<SliderWithLabel
|
||||
{...field}
|
||||
sliderMaxWidth={{ xs: "100%", md: "50%" }}
|
||||
fieldLabel={t(
|
||||
"pages.createMonitor.form.thresholds.option.tempThreshold.label"
|
||||
)}
|
||||
min={0}
|
||||
max={100}
|
||||
step={1}
|
||||
valueLabelDisplay="auto"
|
||||
valueLabelFormat={(value) => `${value}°C`}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</Stack>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
|
||||
<ConfigBox
|
||||
title={t("pages.createMonitor.form.incidents.title")}
|
||||
subtitle={t("pages.createMonitor.form.incidents.description")}
|
||||
@@ -617,11 +748,21 @@ const CreateMonitorPage = () => {
|
||||
"pages.createMonitor.form.advanced.option.matchMethod.label"
|
||||
)}
|
||||
>
|
||||
<MenuItem value="equal">{t("matchMethodOptions.equal")}</MenuItem>
|
||||
<MenuItem value="include">
|
||||
{t("matchMethodOptions.include")}
|
||||
<MenuItem value="equal">
|
||||
{t(
|
||||
"pages.createMonitor.form.advanced.option.matchMethod.equal"
|
||||
)}
|
||||
</MenuItem>
|
||||
<MenuItem value="include">
|
||||
{t(
|
||||
"pages.createMonitor.form.advanced.option.matchMethod.include"
|
||||
)}
|
||||
</MenuItem>
|
||||
<MenuItem value="regex">
|
||||
{t(
|
||||
"pages.createMonitor.form.advanced.option.matchMethod.regex"
|
||||
)}
|
||||
</MenuItem>
|
||||
<MenuItem value="regex">{t("matchMethodOptions.regex")}</MenuItem>
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -46,10 +46,9 @@ export const DialogResolution = ({
|
||||
return (
|
||||
<Dialog
|
||||
open={open}
|
||||
title={t("incidentsPage.resolveIncidentDialogTitle")}
|
||||
title={t("pages.incidents.dialog.resolveIncident.title")}
|
||||
onCancel={handleCancel}
|
||||
onConfirm={handleConfirm}
|
||||
confirmText={t("incidentsPage.resolveIncidentDialogConfirm")}
|
||||
confirmColor="error"
|
||||
cancelColor="primary"
|
||||
loading={isResolving}
|
||||
@@ -58,8 +57,10 @@ export const DialogResolution = ({
|
||||
>
|
||||
<Box sx={{ mt: theme.spacing(4) }}>
|
||||
<TextField
|
||||
fieldLabel={t("incidentsPage.resolveIncidentDialogCommentLabel")}
|
||||
placeholder={t("incidentsPage.resolveIncidentDialogCommentPlaceholder")}
|
||||
fieldLabel={t("pages.incidents.dialog.resolveIncident.option.comment.label")}
|
||||
placeholder={t(
|
||||
"pages.incidents.dialog.resolveIncident.option.comment.placeholder"
|
||||
)}
|
||||
value={comment}
|
||||
onChange={(e) => setComment(e.target.value)}
|
||||
fullWidth
|
||||
|
||||
@@ -9,13 +9,13 @@ import type { Monitor } from "@/Types/Monitor";
|
||||
import type { ActionMenuItem } from "@/Components/v2/actions-menu";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { TypeToPathMap } from "@/Utils/monitorUtilsLegacy.js";
|
||||
import { formatDateWithTz } from "@/Utils/TimeUtils";
|
||||
import { useSelector } from "react-redux";
|
||||
import type { RootState } from "@/Types/state";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import { useTheme } from "@mui/material/styles";
|
||||
import Box from "@mui/material/Box";
|
||||
import { getMonitorPath } from "@/Utils/MonitorUtils";
|
||||
|
||||
interface IncidentsTableProps {
|
||||
title?: string;
|
||||
@@ -62,7 +62,7 @@ export const IncidentsTable = ({
|
||||
label: t("pages.incidents.table.actions.goToMonitor"),
|
||||
action: () => {
|
||||
if (monitor) {
|
||||
const path = TypeToPathMap[monitor.type as keyof typeof TypeToPathMap];
|
||||
const path = getMonitorPath(monitor.type);
|
||||
if (path && monitor.id) {
|
||||
navigate(`/${path}/${monitor.id}`);
|
||||
}
|
||||
|
||||
@@ -196,13 +196,13 @@ export const MaintenanceWindowTable = ({
|
||||
/>
|
||||
<DialogInput
|
||||
open={deleteDialogOpen}
|
||||
title={t("maintenanceTableActionMenuDialogTitle")}
|
||||
title={t("common.dialogs.delete.title")}
|
||||
content={t("common.dialogs.delete.description")}
|
||||
onCancel={() => {
|
||||
setDeleteDialogOpen(false);
|
||||
setSelectedWindow(null);
|
||||
}}
|
||||
onConfirm={handleDelete}
|
||||
confirmText={t("delete")}
|
||||
loading={deleteLoading}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
@@ -9,8 +9,8 @@ import { useTheme } from "@mui/material";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
interface NotFoundProps {
|
||||
title: string;
|
||||
desc: string;
|
||||
title?: string;
|
||||
desc?: string;
|
||||
}
|
||||
|
||||
const NotFoundPage = ({ title, desc }: NotFoundProps) => {
|
||||
|
||||
@@ -64,7 +64,7 @@ export const HeaderStatusPageControls = ({
|
||||
},
|
||||
}}
|
||||
>
|
||||
{t("publicLink")}
|
||||
{t("components.headerStatusPageControls.publicLink")}
|
||||
</Typography>
|
||||
<Box>
|
||||
<ExternalLink size={14} />
|
||||
|
||||
@@ -96,7 +96,6 @@ const StatusPageView = () => {
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<Typography variant="h2">{t("statusPageStatusServiceStatus")}</Typography>
|
||||
<StatusBar monitors={monitors} />
|
||||
<MonitorsList
|
||||
statusPage={statusPage}
|
||||
|
||||
Reference in new issue
Block a user