1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 05:19:39 +02:00

fix(app): remove canUndo function from environment variables [EE-6232] (#10961)

Co-authored-by: testa113 <testa113>
This commit is contained in:
Ali 2024-01-17 10:13:53 +13:00 committed by GitHub
parent a8e53a4510
commit 787c7ec4cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 50 additions and 26 deletions

View file

@ -26,7 +26,6 @@ import { YAMLInspector } from '@/react/kubernetes/components/YAMLInspector';
import { ApplicationsStacksDatatable } from '@/react/kubernetes/applications/ListView/ApplicationsStacksDatatable';
import { NodesDatatable } from '@/react/kubernetes/cluster/HomeView/NodesDatatable';
import { StackName } from '@/react/kubernetes/DeployView/StackName/StackName';
import { kubeEnvVarValidationSchema } from '@/react/kubernetes/applications/ApplicationForm/kubeEnvVarValidationSchema';
import { SecretsFormSection } from '@/react/kubernetes/applications/components/ConfigurationsFormSection/SecretsFormSection';
import { configurationsValidationSchema } from '@/react/kubernetes/applications/components/ConfigurationsFormSection/configurationValidationSchema';
import { ConfigMapsFormSection } from '@/react/kubernetes/applications/components/ConfigurationsFormSection/ConfigMapsFormSection';
@ -57,8 +56,8 @@ import {
} from '@/react/kubernetes/applications/components/NameFormSection';
import { deploymentTypeValidation } from '@/react/kubernetes/applications/components/AppDeploymentTypeFormSection/deploymentTypeValidation';
import { AppDeploymentTypeFormSection } from '@/react/kubernetes/applications/components/AppDeploymentTypeFormSection/AppDeploymentTypeFormSection';
import { EnvironmentVariablesFieldset } from '@@/form-components/EnvironmentVariablesFieldset';
import { EnvironmentVariablesFormSection } from '@/react/kubernetes/applications/components/EnvironmentVariablesFormSection/EnvironmentVariablesFormSection';
import { kubeEnvVarValidationSchema } from '@/react/kubernetes/applications/components/EnvironmentVariablesFormSection/kubeEnvVarValidationSchema';
import { applicationsModule } from './applications';
@ -219,17 +218,6 @@ withFormValidation(
kubeServicesValidation
);
withFormValidation(
ngModule,
withControlledInput(withControlledInput(EnvironmentVariablesFieldset), {
values: 'onChange',
}),
'kubeEnvironmentVariablesFieldset',
['canUndoDelete'],
// use kubeEnvVarValidationSchema instead of envVarValidation to add a regex matches rule
kubeEnvVarValidationSchema
);
withFormValidation(
ngModule,
withControlledInput(
@ -350,3 +338,16 @@ withFormValidation(
deploymentTypeValidation,
true
);
withFormValidation(
ngModule,
withControlledInput(
withUIRouter(
withCurrentUser(withReactQuery(EnvironmentVariablesFormSection))
),
{ values: 'onChange' }
),
'environmentVariablesFormSection',
[],
kubeEnvVarValidationSchema
);