From 5fa894cb79ce3fec246225586ee4937a1d9a8c27 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Wed, 23 Sep 2026 11:17:19 -0700 Subject: [PATCH] Add client side types, validation, add swithces to monitor form --- client/src/Hooks/useMonitorForm.ts | 2 ++ client/src/Pages/CreateMonitor/index.tsx | 34 +++++++++++++++--------- client/src/Types/Monitor.ts | 2 ++ client/src/Validation/monitor.ts | 2 ++ client/src/locales/en.json | 12 +++++++++ 5 files changed, 40 insertions(+), 12 deletions(-) diff --git a/client/src/Hooks/useMonitorForm.ts b/client/src/Hooks/useMonitorForm.ts index c487f8d81..1010a94ed 100644 --- a/client/src/Hooks/useMonitorForm.ts +++ b/client/src/Hooks/useMonitorForm.ts @@ -85,6 +85,8 @@ export const getMonitorDefaults = ( dockerTlsKey: "", dockerTlsKeySet: data?.dockerTlsKeySet ?? false, dockerLogsEnabled: data?.dockerLogsEnabled ?? false, + dockerAlertOnStopped: data?.dockerAlertOnStopped ?? false, + dockerAlertOnUnhealthy: data?.dockerAlertOnUnhealthy ?? false, }; break; case "game": diff --git a/client/src/Pages/CreateMonitor/index.tsx b/client/src/Pages/CreateMonitor/index.tsx index 1de12d265..d936d5496 100644 --- a/client/src/Pages/CreateMonitor/index.tsx +++ b/client/src/Pages/CreateMonitor/index.tsx @@ -617,7 +617,6 @@ const CreateMonitorPage = () => { } /> )} - {showStep(0) && ( { } /> )} - {showStep(0) && watchedType === "docker" && isDockerTlsUrl(watchedUrl) && ( { } /> )} - {showStep(1) && ( { } /> )} - {/* Alert Thresholds - only for hardware type */} {watchedType === "hardware" && showStep(1) && ( { } /> )} - {showStep(1) && ( { } /> )} - {showStep(1) && ( { } /> )} - {showStep(1) && ( { } /> )} - {showStep(1) && watchedType === "docker" && !isCaptureDocker && ( { } /> )} - + {showStep(1) && watchedType === "docker" && ( + + + + + } + /> + )} {showStep(2) && (watchedType === "http" || watchedType === "grpc" || @@ -989,7 +1002,6 @@ const CreateMonitorPage = () => { } /> )} - {showStep(2) && watchedType === "http" && ( { } /> )} - {showStep(2) && supportsGeoCheck(watchedType) && ( { } /> )} -