diff --git a/messages/en-US.json b/messages/en-US.json index 5492768f1..13b47d135 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -1903,6 +1903,7 @@ "configureHealthCheck": "Configure Health Check", "configureHealthCheckDescription": "Set up health monitoring for {target}", "enableHealthChecks": "Enable Health Checks", + "healthCheckDisabledStateDescription": "When disabled, the site will not perform health checks and the state will be considered unknown.", "enableHealthChecksDescription": "Monitor the health of this target. You can monitor a different endpoint than the target if required.", "healthScheme": "Method", "healthSelectScheme": "Select Method", diff --git a/src/components/HealthCheckCredenza.tsx b/src/components/HealthCheckCredenza.tsx index 671a16e7d..c5ab59064 100644 --- a/src/components/HealthCheckCredenza.tsx +++ b/src/components/HealthCheckCredenza.tsx @@ -46,6 +46,7 @@ import { SitesSelector } from "@app/components/site-selector"; import type { Selectedsite } from "@app/components/site-selector"; import { CaretSortIcon } from "@radix-ui/react-icons"; import { cn } from "@app/lib/cn"; +import { SwitchInput } from "@app/components/SwitchInput"; export type HealthCheckConfig = { hcEnabled: boolean; @@ -407,7 +408,7 @@ export function HealthCheckCredenza(props: HealthCheckCredenzaProps) { }) : t("standaloneHcDescription"); - const showFields = mode === "submit" || watchedEnabled; + const disableTabInputs = mode === "autoSave" && !watchedEnabled; const isSnmpOrIcmp = watchedMode === "snmp" || watchedMode === "icmp"; const isTcp = watchedMode === "tcp"; @@ -491,6 +492,40 @@ export function HealthCheckCredenza(props: HealthCheckCredenzaProps) { )} + {mode === "autoSave" && ( +
- {t("enableHealthChecks")} -
- )} - +- {t("enableHealthChecks")} -
- )} - +