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

refactor(app): app service form to react [EE-5415] (#8994)

This commit is contained in:
Ali 2023-05-31 17:58:41 +12:00 committed by GitHub
parent 2d05103fed
commit 69776b4863
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 1224 additions and 538 deletions

View file

@ -7,6 +7,10 @@ import { StorageAccessModeSelector } from '@/react/kubernetes/cluster/ConfigureV
import { NamespaceAccessUsersSelector } from '@/react/kubernetes/namespaces/AccessView/NamespaceAccessUsersSelector';
import { CreateNamespaceRegistriesSelector } from '@/react/kubernetes/namespaces/CreateView/CreateNamespaceRegistriesSelector';
import { KubeApplicationAccessPolicySelector } from '@/react/kubernetes/applications/CreateView/KubeApplicationAccessPolicySelector';
import {
KubeServicesForm,
kubeServicesValidation,
} from '@/react/kubernetes/applications/CreateView/application-services/KubeServicesForm';
import { KubeApplicationDeploymentTypeSelector } from '@/react/kubernetes/applications/CreateView/KubeApplicationDeploymentTypeSelector';
import { withReactQuery } from '@/react-tools/withReactQuery';
import { withUIRouter } from '@/react-tools/withUIRouter';
@ -15,8 +19,10 @@ import {
ApplicationDetailsWidget,
} from '@/react/kubernetes/applications/DetailsView';
import { withUserProvider } from '@/react/test-utils/withUserProvider';
import { withFormValidation } from '@/react-tools/withFormValidation';
import { withCurrentUser } from '@/react-tools/withCurrentUser';
export const componentsModule = angular
export const ngModule = angular
.module('portainer.kubernetes.react.components', [])
.component(
'ingressClassDatatable',
@ -93,7 +99,7 @@ export const componentsModule = angular
.component(
'applicationSummaryWidget',
r2a(
withUIRouter(withReactQuery(withUserProvider(ApplicationSummaryWidget))),
withUIRouter(withReactQuery(withCurrentUser(ApplicationSummaryWidget))),
[]
)
)
@ -103,4 +109,21 @@ export const componentsModule = angular
withUIRouter(withReactQuery(withUserProvider(ApplicationDetailsWidget))),
[]
)
).name;
);
export const componentsModule = ngModule.name;
withFormValidation(
ngModule,
withUIRouter(withCurrentUser(withReactQuery(KubeServicesForm))),
'kubeServicesForm',
[
'values',
'onChange',
'loadBalancerEnabled',
'appName',
'selector',
'isEditMode',
],
kubeServicesValidation
);