- {selectedSite ? selectedSite.name : t("siteSelect")}
+ {selectedSite
+ ? selectedSite.name
+ : t("siteSelect")}
@@ -494,7 +504,7 @@ export function HealthCheckCredenza(props: HealthCheckCredenzaProps) {
)}
{mode === "autoSave" && (
-
+
- {/* Strategy picker */}
- (
-
-
- (
+
+
+
+ handleChange(
+ "hcMode",
+ value,
+ field.onChange
)
- },
- {
- id: "tcp",
- title: "TCP",
- description: t(
- "healthCheckStrategyTcp"
- )
- },
- // lets hide these for now until they are implemented
- // {
- // id: "snmp",
- // title: "SNMP",
- // description: t(
- // "healthCheckStrategySnmp"
- // )
- // },
- // {
- // id: "icmp",
- // title: "Ping (ICMP)",
- // description: t(
- // "healthCheckStrategyIcmp"
- // )
- // }
- ]}
- value={field.value}
- onChange={(value) =>
- handleChange(
- "hcMode",
- value,
- field.onChange
- )
- }
- />
-
-
-
- )}
- />
+ }
+ />
+
+
+
+ )}
+ />
@@ -625,325 +641,369 @@ export function HealthCheckCredenza(props: HealthCheckCredenzaProps) {
"pointer-events-none opacity-60"
)}
>
- {/* Contact-sales banner for SNMP / ICMP */}
- {isSnmpOrIcmp &&
}
+ {/* Contact-sales banner for SNMP / ICMP */}
+ {isSnmpOrIcmp && (
+
+ )}
- {!isSnmpOrIcmp && (
- <>
- {/* Scheme / Hostname / Port */}
- {isTcp ? (
-
-
(
-
-
- {t(
- "healthHostname"
- )}
-
-
-
+ {/* Scheme / Hostname / Port */}
+ {isTcp ? (
+
+ (
+
+
+ {t(
+ "healthHostname"
+ )}
+
+
+
+ handleChange(
+ "hcHostname",
+ e
+ .target
+ .value,
+ () =>
+ field.onChange(
+ e
+ )
+ )
+ }
+ />
+
+
+
+ )}
+ />
+ (
+
+
+ {t(
+ "healthPort"
+ )}
+
+
+
+ handleChange(
+ "hcPort",
+ e
+ .target
+ .value,
+ field.onChange
+ )
+ }
+ />
+
+
+
+ )}
+ />
+
+ ) : (
+
+ (
+
+
+ {t(
+ "healthScheme"
+ )}
+
+
- )}
- />
- (
-
-
- {t(
- "healthPort"
- )}
-
-
-
- handleChange(
- "hcPort",
- e
- .target
- .value,
+ "hcScheme",
+ value,
field.onChange
)
}
- />
-
-
-
- )}
- />
-
- ) : (
-
- (
-
-
- {t(
- "healthScheme"
- )}
-
-
+
+
+ )}
+ />
+ (
+
+
+ {t(
+ "healthHostname"
+ )}
+
-
-
-
+
+ handleChange(
+ "hcHostname",
+ e
+ .target
+ .value,
+ () =>
+ field.onChange(
+ e
+ )
+ )
+ }
+ />
-
-
- HTTP
-
-
- HTTPS
-
-
-
-
-
- )}
- />
- (
-
-
- {t(
- "healthHostname"
- )}
-
-
-
+
+ )}
+ />
+ (
+
+
+ {t(
+ "healthPort"
+ )}
+
+
+
+ handleChange(
+ "hcPort",
+ e
+ .target
+ .value,
+ field.onChange
+ )
+ }
+ />
+
+
+
+ )}
+ />
+
+ )}
+
+ {/* Method / Path / Timeout (HTTP) */}
+ {!isTcp && (
+
+ (
+
+
+ {t(
+ "httpMethod"
+ )}
+
+
- )}
- />
- (
-
-
- {t(
- "healthPort"
- )}
-
-
-
- handleChange(
- "hcPort",
- e
- .target
- .value,
+ "hcMethod",
+ value,
field.onChange
)
}
- />
-
-
-
- )}
- />
-
- )}
-
- {/* Method / Path / Timeout (HTTP) */}
- {!isTcp && (
-
- (
-
-
- {t(
- "httpMethod"
- )}
-
-
-
-
- )}
- />
- (
-
-
- {t(
- "healthCheckPath"
- )}
-
-
-
- handleChange(
- "hcPath",
- e
- .target
- .value,
- () =>
- field.onChange(
- e
- )
- )
+ value={
+ field.value
}
- />
-
-
-
- )}
- />
+ >
+
+
+
+
+
+
+
+ GET
+
+
+ POST
+
+
+ HEAD
+
+
+ PUT
+
+
+ DELETE
+
+
+
+
+
+ )}
+ />
+ (
+
+
+ {t(
+ "healthCheckPath"
+ )}
+
+
+
+ handleChange(
+ "hcPath",
+ e
+ .target
+ .value,
+ () =>
+ field.onChange(
+ e
+ )
+ )
+ }
+ />
+
+
+
+ )}
+ />
+ (
+
+
+ {t(
+ "timeoutSeconds"
+ )}
+
+
+
+ handleChange(
+ "hcTimeout",
+ parseInt(
+ e
+ .target
+ .value
+ ),
+ field.onChange
+ )
+ }
+ />
+
+
+
+ )}
+ />
+
+ )}
+
+ {/* Timeout for TCP */}
+ {isTcp && (
)}
/>
-
- )}
-
- {/* Timeout for TCP */}
- {isTcp && (
-
(
-
-
- {t(
- "timeoutSeconds"
- )}
-
-
-
- handleChange(
- "hcTimeout",
- parseInt(
- e
- .target
- .value
- ),
- field.onChange
- )
- }
- />
-
-
-
- )}
- />
- )}
- >
- )}
+ )}
+ >
+ )}
@@ -1035,323 +1057,340 @@ export function HealthCheckCredenza(props: HealthCheckCredenzaProps) {
"pointer-events-none opacity-60"
)}
>
- {/* Contact-sales banner for SNMP / ICMP */}
- {isSnmpOrIcmp && }
+ {/* Contact-sales banner for SNMP / ICMP */}
+ {isSnmpOrIcmp && (
+
+ )}
- {!isSnmpOrIcmp && (
- <>
- {/* Healthy interval + threshold */}
-
- (
-
-
- {t(
- "healthyIntervalSeconds"
- )}
-
-
-
- handleChange(
- "hcInterval",
- parseInt(
- e
- .target
- .value
- ),
- field.onChange
- )
- }
- />
-
-
-
- )}
- />
- (
-
-
- {t(
- "healthyThreshold"
- )}
-
-
-
- handleChange(
- "hcHealthyThreshold",
- parseInt(
- e
- .target
- .value
- ),
- field.onChange
- )
- }
- />
-
-
-
- )}
- />
-
-
- {/* Unhealthy interval + threshold */}
-
- (
-
-
- {t(
- "unhealthyIntervalSeconds"
- )}
-
-
-
- handleChange(
- "hcUnhealthyInterval",
- parseInt(
- e
- .target
- .value
- ),
- field.onChange
- )
- }
- />
-
-
-
- )}
- />
- (
-
-
- {t(
- "unhealthyThreshold"
- )}
-
-
-
- handleChange(
- "hcUnhealthyThreshold",
- parseInt(
- e
- .target
- .value
- ),
- field.onChange
- )
- }
- />
-
-
-
- )}
- />
-
-
- {/* HTTP-only advanced fields */}
- {!isTcp && (
- <>
- {/* Expected status + TLS server name */}
-
- (
-
-
- {t(
- "expectedResponseCodes"
- )}
-
-
- {
- const val =
- e
- .target
- .value;
- const value =
- val
- ? parseInt(
- val
- )
- : null;
- handleChange(
- "hcStatus",
- value,
- field.onChange
- );
- }}
- />
-
-
-
- )}
- />
- (
-
-
- {t(
- "tlsServerName"
- )}
-
-
-
- handleChange(
- "hcTlsServerName",
- e
- .target
- .value,
- () =>
- field.onChange(
- e
- )
- )
- }
- />
-
-
-
- )}
- />
-
-
- {/* Follow redirects */}
+ {!isSnmpOrIcmp && (
+ <>
+ {/* Healthy interval + threshold */}
+
(
-
-
- {t(
- "followRedirects"
- )}
-
-
-
- handleChange(
- "hcFollowRedirects",
- value,
- field.onChange
- )
- }
- />
-
-
- )}
- />
-
- {/* Custom headers */}
- (
{t(
- "customHeaders"
+ "healthyIntervalSeconds"
)}
-
handleChange(
- "hcHeaders",
- value,
+ "hcInterval",
+ parseInt(
+ e
+ .target
+ .value
+ ),
field.onChange
)
}
- rows={
- 4
- }
/>
-
- {t(
- "customHeadersDescription"
- )}
-
)}
/>
- >
- )}
- >
- )}
+ (
+
+
+ {t(
+ "healthyThreshold"
+ )}
+
+
+
+ handleChange(
+ "hcHealthyThreshold",
+ parseInt(
+ e
+ .target
+ .value
+ ),
+ field.onChange
+ )
+ }
+ />
+
+
+
+ )}
+ />
+
+
+ {/* Unhealthy interval + threshold */}
+
+ (
+
+
+ {t(
+ "unhealthyIntervalSeconds"
+ )}
+
+
+
+ handleChange(
+ "hcUnhealthyInterval",
+ parseInt(
+ e
+ .target
+ .value
+ ),
+ field.onChange
+ )
+ }
+ />
+
+
+
+ )}
+ />
+ (
+
+
+ {t(
+ "unhealthyThreshold"
+ )}
+
+
+
+ handleChange(
+ "hcUnhealthyThreshold",
+ parseInt(
+ e
+ .target
+ .value
+ ),
+ field.onChange
+ )
+ }
+ />
+
+
+
+ )}
+ />
+
+
+ {/* HTTP-only advanced fields */}
+ {!isTcp && (
+ <>
+ {/* Expected status + TLS server name */}
+
+ (
+
+
+ {t(
+ "expectedResponseCodes"
+ )}
+
+
+ {
+ const val =
+ e
+ .target
+ .value;
+ const value =
+ val
+ ? parseInt(
+ val
+ )
+ : null;
+ handleChange(
+ "hcStatus",
+ value,
+ field.onChange
+ );
+ }}
+ />
+
+
+
+ )}
+ />
+ (
+
+
+ {t(
+ "tlsServerName"
+ )}
+
+
+
+ handleChange(
+ "hcTlsServerName",
+ e
+ .target
+ .value,
+ () =>
+ field.onChange(
+ e
+ )
+ )
+ }
+ />
+
+
+
+ )}
+ />
+
+
+ {/* Follow redirects */}
+ (
+
+
+
+ handleChange(
+ "hcFollowRedirects",
+ value,
+ field.onChange
+ )
+ }
+ />
+
+
+ )}
+ />
+
+ {/* Custom headers */}
+ (
+
+
+ {t(
+ "customHeaders"
+ )}
+
+
+
+ handleChange(
+ "hcHeaders",
+ value,
+ field.onChange
+ )
+ }
+ rows={
+ 4
+ }
+ />
+
+
+ {t(
+ "customHeadersDescription"
+ )}
+
+
+
+ )}
+ />
+ >
+ )}
+ >
+ )}