refactor: Update ServiceEditSheet component to improve load balancing and health check display logic, ensuring accurate representation based on target IPs and enhancing user clarity
Build, Test, and Push CFDM Docker Image / test (push) Successful in 3m31s
Build, Test, and Push CFDM Docker Image / build-and-push (push) Successful in 1m53s
Build, Test, and Push CFDM Docker Image / update-wiki (push) Successful in 7s
Build, Test, and Push CFDM Docker Image / create-release (push) Has been skipped
Build, Test, and Push CFDM Docker Image / test (push) Successful in 3m31s
Build, Test, and Push CFDM Docker Image / build-and-push (push) Successful in 1m53s
Build, Test, and Push CFDM Docker Image / update-wiki (push) Successful in 7s
Build, Test, and Push CFDM Docker Image / create-release (push) Has been skipped
This commit is contained in:
@@ -529,8 +529,9 @@ export function ServiceEditSheet({
|
|||||||
<AppItemGroup className="gap-2">
|
<AppItemGroup className="gap-2">
|
||||||
{bindings.map((binding, index) => {
|
{bindings.map((binding, index) => {
|
||||||
const showLbBlock =
|
const showLbBlock =
|
||||||
binding.record_type === 'A' && binding.target_ips.length > 1
|
binding.record_type === 'A' && binding.target_ips.length > 0
|
||||||
const showMeta = binding.lb_mode !== 'round_robin'
|
const showMeta =
|
||||||
|
binding.target_ips.length > 1 && binding.lb_mode !== 'round_robin'
|
||||||
return (
|
return (
|
||||||
<AppItem key={`binding-${index}`} variant="outline">
|
<AppItem key={`binding-${index}`} variant="outline">
|
||||||
<AppItemContent className="flex flex-col gap-3">
|
<AppItemContent className="flex flex-col gap-3">
|
||||||
@@ -601,7 +602,9 @@ export function ServiceEditSheet({
|
|||||||
<Accordion defaultValue={[`lb-${index}`]}>
|
<Accordion defaultValue={[`lb-${index}`]}>
|
||||||
<AccordionItem value={`lb-${index}`}>
|
<AccordionItem value={`lb-${index}`}>
|
||||||
<AccordionTrigger>
|
<AccordionTrigger>
|
||||||
Балансировка и Health-check (multi-A)
|
{binding.target_ips.length > 1
|
||||||
|
? 'Балансировка и Health-check (multi-A)'
|
||||||
|
: 'Health-check'}
|
||||||
</AccordionTrigger>
|
</AccordionTrigger>
|
||||||
<AccordionContent>
|
<AccordionContent>
|
||||||
<HealthCheckConfigFields
|
<HealthCheckConfigFields
|
||||||
@@ -619,6 +622,7 @@ export function ServiceEditSheet({
|
|||||||
handleBindingHealthChange(index, next)
|
handleBindingHealthChange(index, next)
|
||||||
}
|
}
|
||||||
lbModeLabel="Режим балансировки"
|
lbModeLabel="Режим балансировки"
|
||||||
|
showLbMode={binding.target_ips.length > 1}
|
||||||
idPrefix={`binding-${index}-health`}
|
idPrefix={`binding-${index}-health`}
|
||||||
/>
|
/>
|
||||||
</AccordionContent>
|
</AccordionContent>
|
||||||
|
|||||||
Reference in New Issue
Block a user