diff --git a/src/modules/deployment/deployment-scaling/deployment-scaling.tsx b/src/modules/deployment/deployment-scaling/deployment-scaling.tsx
index 2d9a34231..909f7edb4 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 643b357eb..b2033e306 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 && (
-