1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 05:45:22 +02:00

refactor(ui): migrate env var field to react [EE-4853] (#8451)

This commit is contained in:
Chaim Lev-Ari 2023-05-31 10:08:41 +07:00 committed by GitHub
parent 6b5940e00e
commit 2d05103fed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 721 additions and 442 deletions

View file

@ -5,7 +5,13 @@ import { withCurrentUser } from '@/react-tools/withCurrentUser';
import { withReactQuery } from '@/react-tools/withReactQuery';
import { withUIRouter } from '@/react-tools/withUIRouter';
import { AnnotationsBeTeaser } from '@/react/kubernetes/annotations/AnnotationsBeTeaser';
import { withFormValidation } from '@/react-tools/withFormValidation';
import {
EnvironmentVariablesFieldset,
EnvironmentVariablesPanel,
envVarValidation,
} from '@@/form-components/EnvironmentVariablesFieldset';
import { Icon } from '@@/Icon';
import { ReactQueryDevtoolsWrapper } from '@@/ReactQueryDevtoolsWrapper';
import { PageHeader } from '@@/PageHeader';
@ -37,7 +43,7 @@ import { environmentsModule } from './environments';
import { envListModule } from './environments-list-view-components';
import { registriesModule } from './registries';
export const componentsModule = angular
export const ngModule = angular
.module('portainer.app.react.components', [
accessControlModule,
customTemplatesModule,
@ -197,4 +203,22 @@ export const componentsModule = angular
'height',
])
)
.component('annotationsBeTeaser', r2a(AnnotationsBeTeaser, [])).name;
.component('annotationsBeTeaser', r2a(AnnotationsBeTeaser, []));
export const componentsModule = ngModule.name;
withFormValidation(
ngModule,
EnvironmentVariablesFieldset,
'environmentVariablesFieldset',
[],
envVarValidation
);
withFormValidation(
ngModule,
EnvironmentVariablesPanel,
'environmentVariablesPanel',
['explanation', 'showHelpMessage'],
envVarValidation
);