From 2cc0bf3086caa0a0e2ff49cd20dd4def5377ab4b Mon Sep 17 00:00:00 2001 From: nils Date: Wed, 18 Feb 2026 18:01:17 +0100 Subject: [PATCH] always show manual scaling configuration --- .../deployment-scaling/deployment-scaling.tsx | 59 ++++++------------- .../deployment-scaling/manual-scaling.tsx | 7 ++- 2 files changed, 23 insertions(+), 43 deletions(-) diff --git a/src/modules/deployment/deployment-scaling/deployment-scaling.tsx b/src/modules/deployment/deployment-scaling/deployment-scaling.tsx index 2d9a3423..909f7edb 100644 --- a/src/modules/deployment/deployment-scaling/deployment-scaling.tsx +++ b/src/modules/deployment/deployment-scaling/deployment-scaling.tsx @@ -1,6 +1,3 @@ -import { Button } from '@koyeb/design-system'; -import clsx from 'clsx'; -import { useState } from 'react'; import { Controller, useForm } from 'react-hook-form'; import { useDeploymentScalingQuery, useService, useServiceScaling } from 'src/api'; @@ -33,60 +30,38 @@ export function DeploymentScaling({ deployment }: { deployment: ComputeDeploymen filters: filtersForm.watch(), }); - const [initiateManualScaling, setInitiateManualScaling] = useState(false); const manualScaling = useServiceScaling(deployment.serviceId); - const showManualScaling = Boolean(manualScaling) || initiateManualScaling; return (
-
+
-
- - - - - ( - } - regions={deployment.definition.regions} - value={field.value} - onChange={field.onChange} - dropdown={{ floating: { placement: 'bottom-end' }, matchReferenceSize: false }} - className="min-w-48" - /> - )} - /> -
+ ( + } + regions={deployment.definition.regions} + value={field.value} + onChange={field.onChange} + dropdown={{ floating: { placement: 'bottom-end' }, matchReferenceSize: false }} + className="min-w-48" + /> + )} + />
- {isActiveDeployment && showManualScaling && ( + {isActiveDeployment && ( { - setInitiateManualScaling(false); - void query.refetch(); - }} + onChanged={() => void query.refetch()} /> )} diff --git a/src/modules/deployment/deployment-scaling/manual-scaling.tsx b/src/modules/deployment/deployment-scaling/manual-scaling.tsx index 643b357e..b2033e30 100644 --- a/src/modules/deployment/deployment-scaling/manual-scaling.tsx +++ b/src/modules/deployment/deployment-scaling/manual-scaling.tsx @@ -111,7 +111,12 @@ export function ManualScaling({ deployment, defaultValue, onChanged }: ManualSca {showButtons && (
-