Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions client/src/Pages/CreateMonitor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useEffect } from "react";
import { useParams, useLocation, useNavigate } from "react-router";
import { useForm, Controller } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { useTheme } from "@mui/material";
import { useTheme, Alert } from "@mui/material";
import Stack from "@mui/material/Stack";
import RadioGroup from "@mui/material/RadioGroup";
import FormControl from "@mui/material/FormControl";
Expand Down Expand Up @@ -163,6 +163,7 @@ const CreateMonitorPage = () => {
}, [defaults, form]);

const watchedType = watch("type") as MonitorType;
const watchedUrl = watch("url");

const watchedUseAdvancedMatching = watch("useAdvancedMatching") as boolean;

Expand Down Expand Up @@ -313,13 +314,17 @@ const CreateMonitorPage = () => {
fieldLabel={generalSettingsConfig.urlLabel}
placeholder={generalSettingsConfig.urlPlaceholder}
fullWidth
disabled={isEditMode}
error={!!fieldState.error}
helperText={fieldState.error?.message ?? ""}
/>
)}
/>
)}
{isEditMode &&
generalSettingsConfig.showUrl &&
Comment thread
Aryan1718 marked this conversation as resolved.
Outdated
watchedUrl !== existingMonitor?.url && (
Comment thread
Aryan1718 marked this conversation as resolved.
Outdated
<Alert severity="warning">{t("urlUpdateWarning")}</Alert>
Comment thread
Aryan1718 marked this conversation as resolved.
Outdated
)}

{/* Port field - only for port and game types */}
{generalSettingsConfig.showPort && (
Expand Down
4 changes: 2 additions & 2 deletions client/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,6 @@
"duration": {
"label": "Duration"
},

"startTime": {
"label": "Start time"
}
Expand Down Expand Up @@ -1452,5 +1451,6 @@
"monitorDeleted": "Monitor deleted successfully",
"monitorPaused": "Monitor paused successfully",
"monitorResumed": "Monitor resumed successfully",
"name": "Name"
"name": "Name",
"urlUpdateWarning": "The dashboard will now pull its data from the updated URL."
}