diff --git a/server/routers/target/listTargets.ts b/server/routers/target/listTargets.ts index 18e932afa..df3d508c5 100644 --- a/server/routers/target/listTargets.ts +++ b/server/routers/target/listTargets.ts @@ -56,6 +56,8 @@ function queryTargets(resourceId: number) { hcStatus: targetHealthCheck.hcStatus, hcHealth: targetHealthCheck.hcHealth, hcTlsServerName: targetHealthCheck.hcTlsServerName, + hcHealthyThreshold: targetHealthCheck.hcHealthyThreshold, + hcUnhealthyThreshold: targetHealthCheck.hcUnhealthyThreshold, path: targets.path, pathMatchType: targets.pathMatchType, rewritePath: targets.rewritePath, diff --git a/src/app/[orgId]/settings/resources/proxy/[niceId]/proxy/page.tsx b/src/app/[orgId]/settings/resources/proxy/[niceId]/proxy/page.tsx index 0846fc896..ba237b9b6 100644 --- a/src/app/[orgId]/settings/resources/proxy/[niceId]/proxy/page.tsx +++ b/src/app/[orgId]/settings/resources/proxy/[niceId]/proxy/page.tsx @@ -652,6 +652,8 @@ function ProxyResourceTargetsForm({ hcMode: null, hcUnhealthyInterval: null, hcTlsServerName: null, + hcHealthyThreshold: null, + hcUnhealthyThreshold: null, siteType: sites.length > 0 ? sites[0].type : null, new: true, updated: false @@ -761,7 +763,9 @@ function ProxyResourceTargetsForm({ hcStatus: target.hcStatus || null, hcUnhealthyInterval: target.hcUnhealthyInterval || null, hcMode: target.hcMode || null, - hcTlsServerName: target.hcTlsServerName + hcTlsServerName: target.hcTlsServerName, + hcHealthyThreshold: target.hcHealthyThreshold || null, + hcUnhealthyThreshold: target.hcUnhealthyThreshold || null }; // Only include path-related fields for HTTP resources @@ -1018,7 +1022,13 @@ function ProxyResourceTargetsForm({ 30, hcTlsServerName: selectedTargetForHealthCheck.hcTlsServerName || - undefined + undefined, + hcHealthyThreshold: + selectedTargetForHealthCheck.hcHealthyThreshold || + 1, + hcUnhealthyThreshold: + selectedTargetForHealthCheck.hcUnhealthyThreshold || + 1 }} onChanges={async (config) => { if (selectedTargetForHealthCheck) { diff --git a/src/app/[orgId]/settings/resources/proxy/create/page.tsx b/src/app/[orgId]/settings/resources/proxy/create/page.tsx index 8eae652cd..65d671681 100644 --- a/src/app/[orgId]/settings/resources/proxy/create/page.tsx +++ b/src/app/[orgId]/settings/resources/proxy/create/page.tsx @@ -303,6 +303,8 @@ export default function Page() { hcMode: null, hcUnhealthyInterval: null, hcTlsServerName: null, + hcHealthyThreshold: null, + hcUnhealthyThreshold: null, siteType: sites.length > 0 ? sites[0].type : null, new: true, updated: false @@ -552,7 +554,11 @@ export default function Page() { hcUnhealthyInterval: target.hcUnhealthyInterval || null, hcMode: target.hcMode || null, - hcTlsServerName: target.hcTlsServerName + hcTlsServerName: target.hcTlsServerName, + hcHealthyThreshold: + target.hcHealthyThreshold || null, + hcUnhealthyThreshold: + target.hcUnhealthyThreshold || null }; // Only include path-related fields for HTTP resources @@ -1520,7 +1526,13 @@ export default function Page() { 30, hcTlsServerName: selectedTargetForHealthCheck.hcTlsServerName || - undefined + undefined, + hcHealthyThreshold: + selectedTargetForHealthCheck.hcHealthyThreshold || + 1, + hcUnhealthyThreshold: + selectedTargetForHealthCheck.hcUnhealthyThreshold || + 1 }} onChanges={async (config) => { if (selectedTargetForHealthCheck) {