From 2d77e71085aa09ec5b4b5bf1cbc7076b7764909d Mon Sep 17 00:00:00 2001 From: Ali <83188384+testA113@users.noreply.github.com> Date: Wed, 3 Jan 2024 10:42:39 +1300 Subject: [PATCH] refactor(app): migrate-autoscaling [EE-6387] (#10709) * refactor(app): migrate-autoscaling [EE-6387] --- app/kubernetes/react/components/index.ts | 12 ++ .../create/createApplication.html | 129 +---------------- .../create/createApplicationController.js | 21 +++ .../AutoScalingFormSection.tsx | 132 ++++++++++++++++++ .../autoScalingValidation.ts | 69 +++++++++ .../AutoScalingFormSection/index.ts | 2 + .../AutoScalingFormSection/types.ts | 6 + 7 files changed, 249 insertions(+), 122 deletions(-) create mode 100644 app/react/kubernetes/applications/components/AutoScalingFormSection/AutoScalingFormSection.tsx create mode 100644 app/react/kubernetes/applications/components/AutoScalingFormSection/autoScalingValidation.ts create mode 100644 app/react/kubernetes/applications/components/AutoScalingFormSection/index.ts create mode 100644 app/react/kubernetes/applications/components/AutoScalingFormSection/types.ts diff --git a/app/kubernetes/react/components/index.ts b/app/kubernetes/react/components/index.ts index 0f44e3c66..e9f986fbc 100644 --- a/app/kubernetes/react/components/index.ts +++ b/app/kubernetes/react/components/index.ts @@ -38,6 +38,10 @@ import { ReplicationFormSection, replicationValidation, } from '@/react/kubernetes/applications/components/ReplicationFormSection'; +import { + AutoScalingFormSection, + autoScalingValidation, +} from '@/react/kubernetes/applications/components/AutoScalingFormSection'; import { EnvironmentVariablesFieldset } from '@@/form-components/EnvironmentVariablesFieldset'; @@ -255,3 +259,11 @@ withFormValidation( ], replicationValidation ); + +withFormValidation( + ngModule, + withUIRouter(withCurrentUser(withReactQuery(AutoScalingFormSection))), + 'autoScalingFormSection', + ['isMetricsEnabled'], + autoScalingValidation +); diff --git a/app/kubernetes/views/applications/create/createApplication.html b/app/kubernetes/views/applications/create/createApplication.html index d9320c6f2..a2afda66c 100644 --- a/app/kubernetes/views/applications/create/createApplication.html +++ b/app/kubernetes/views/applications/create/createApplication.html @@ -466,128 +466,13 @@ - -
This feature is currently disabled and must be enabled by an administrator user.
-- Server metrics features must be enabled in the - environment configuration view. -
-
-
-
-
-
-