Skip to content
Open
Show file tree
Hide file tree
Changes from all 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 @@ -4,7 +4,7 @@ import { logger } from "@/Utils/logger";
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 @@ -209,6 +209,7 @@ const CreateMonitorPage = () => {
}, [defaults, form]);

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

const watchedUseAdvancedMatching = watch("useAdvancedMatching") as boolean;
const watchGeoCheckEnabled = watch("geoCheckEnabled") as boolean;
Expand Down Expand Up @@ -374,13 +375,17 @@ const CreateMonitorPage = () => {
fieldLabel={generalSettingsConfig.urlLabel}
placeholder={generalSettingsConfig.urlPlaceholder}
fullWidth
disabled={isEditMode}
error={!!fieldState.error}
helperText={fieldState.error?.message ?? ""}
/>
)}
/>
)}
{isEditMode && existingMonitor && watchedUrl !== existingMonitor.url && (
<Alert severity="warning">
{t("pages.createMonitor.form.general.url.alert")}
</Alert>
)}

{/* Port field - only for port and game types */}
{generalSettingsConfig.showPort && (
Expand Down
3 changes: 3 additions & 0 deletions client/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,9 @@
"placeholder": "wss://example.com/socket"
}
},
"url": {
"alert": "The dashboard will now pull its data from the updated URL."
},
"title": "General settings",
"description": {
"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.",
Expand Down
Loading