2022-05-17 04:22:44 +00:00
|
|
|
import angular from 'angular';
|
|
|
|
|
2022-09-21 07:10:58 +00:00
|
|
|
import { r2a } from '@/react-tools/react2angular';
|
2023-10-11 19:32:02 +00:00
|
|
|
import { IngressClassDatatableAngular } from '@/react/kubernetes/cluster/ingressClass/IngressClassDatatable/IngressClassDatatableAngular';
|
2022-09-21 07:10:58 +00:00
|
|
|
import { NamespacesSelector } from '@/react/kubernetes/cluster/RegistryAccessView/NamespacesSelector';
|
2023-09-05 16:06:36 +00:00
|
|
|
import { StorageAccessModeSelector } from '@/react/kubernetes/cluster/ConfigureView/ConfigureForm/StorageAccessModeSelector';
|
2022-09-21 07:10:58 +00:00
|
|
|
import { NamespaceAccessUsersSelector } from '@/react/kubernetes/namespaces/AccessView/NamespaceAccessUsersSelector';
|
2023-10-11 19:32:02 +00:00
|
|
|
import { RegistriesSelector } from '@/react/kubernetes/namespaces/components/RegistriesFormSection/RegistriesSelector';
|
2023-02-07 03:33:57 +00:00
|
|
|
import { KubeApplicationAccessPolicySelector } from '@/react/kubernetes/applications/CreateView/KubeApplicationAccessPolicySelector';
|
2023-06-26 04:21:19 +00:00
|
|
|
import { KubeServicesForm } from '@/react/kubernetes/applications/CreateView/application-services/KubeServicesForm';
|
|
|
|
import { kubeServicesValidation } from '@/react/kubernetes/applications/CreateView/application-services/kubeServicesValidation';
|
2023-02-07 03:33:57 +00:00
|
|
|
import { KubeApplicationDeploymentTypeSelector } from '@/react/kubernetes/applications/CreateView/KubeApplicationDeploymentTypeSelector';
|
2023-05-03 03:55:25 +00:00
|
|
|
import { withReactQuery } from '@/react-tools/withReactQuery';
|
|
|
|
import { withUIRouter } from '@/react-tools/withUIRouter';
|
2023-05-29 03:06:14 +00:00
|
|
|
import {
|
|
|
|
ApplicationSummaryWidget,
|
|
|
|
ApplicationDetailsWidget,
|
2023-08-13 17:09:40 +00:00
|
|
|
ApplicationEventsDatatable,
|
2023-05-29 03:06:14 +00:00
|
|
|
} from '@/react/kubernetes/applications/DetailsView';
|
2023-08-17 10:00:25 +00:00
|
|
|
import { ApplicationContainersDatatable } from '@/react/kubernetes/applications/DetailsView/ApplicationContainersDatatable';
|
2023-05-31 05:58:41 +00:00
|
|
|
import { withFormValidation } from '@/react-tools/withFormValidation';
|
|
|
|
import { withCurrentUser } from '@/react-tools/withCurrentUser';
|
2023-08-17 10:01:10 +00:00
|
|
|
import { YAMLInspector } from '@/react/kubernetes/components/YAMLInspector';
|
2023-09-20 06:04:26 +00:00
|
|
|
import { ApplicationsStacksDatatable } from '@/react/kubernetes/applications/ListView/ApplicationsStacksDatatable';
|
2023-10-16 20:19:08 +00:00
|
|
|
import { NodesDatatable } from '@/react/kubernetes/cluster/HomeView/NodesDatatable';
|
2023-10-16 01:08:06 +00:00
|
|
|
import { StackName } from '@/react/kubernetes/DeployView/StackName/StackName';
|
2022-09-21 07:10:58 +00:00
|
|
|
|
2023-05-31 05:58:41 +00:00
|
|
|
export const ngModule = angular
|
2022-09-21 07:10:58 +00:00
|
|
|
.module('portainer.kubernetes.react.components', [])
|
2022-09-26 19:43:24 +00:00
|
|
|
.component(
|
|
|
|
'ingressClassDatatable',
|
2023-10-11 19:32:02 +00:00
|
|
|
r2a(IngressClassDatatableAngular, [
|
2022-10-24 20:41:30 +00:00
|
|
|
'onChangeControllers',
|
2022-09-26 19:43:24 +00:00
|
|
|
'description',
|
|
|
|
'ingressControllers',
|
2023-09-05 16:06:36 +00:00
|
|
|
'initialIngressControllers',
|
2022-10-24 20:41:30 +00:00
|
|
|
'allowNoneIngressClass',
|
2022-10-03 23:13:56 +00:00
|
|
|
'isLoading',
|
2022-09-26 19:43:24 +00:00
|
|
|
'noIngressControllerLabel',
|
|
|
|
'view',
|
|
|
|
])
|
|
|
|
)
|
2022-09-21 07:10:58 +00:00
|
|
|
.component(
|
|
|
|
'namespacesSelector',
|
|
|
|
r2a(NamespacesSelector, [
|
|
|
|
'dataCy',
|
|
|
|
'inputId',
|
|
|
|
'name',
|
|
|
|
'namespaces',
|
|
|
|
'onChange',
|
|
|
|
'placeholder',
|
|
|
|
'value',
|
|
|
|
])
|
|
|
|
)
|
|
|
|
.component(
|
|
|
|
'storageAccessModeSelector',
|
|
|
|
r2a(StorageAccessModeSelector, [
|
|
|
|
'inputId',
|
|
|
|
'onChange',
|
|
|
|
'options',
|
|
|
|
'value',
|
|
|
|
'storageClassName',
|
|
|
|
])
|
|
|
|
)
|
|
|
|
.component(
|
|
|
|
'namespaceAccessUsersSelector',
|
|
|
|
r2a(NamespaceAccessUsersSelector, [
|
|
|
|
'inputId',
|
|
|
|
'onChange',
|
|
|
|
'options',
|
|
|
|
'value',
|
|
|
|
'dataCy',
|
|
|
|
'placeholder',
|
|
|
|
'name',
|
|
|
|
])
|
|
|
|
)
|
|
|
|
.component(
|
|
|
|
'createNamespaceRegistriesSelector',
|
2023-10-11 19:32:02 +00:00
|
|
|
r2a(RegistriesSelector, ['inputId', 'onChange', 'options', 'value'])
|
2023-02-07 03:33:57 +00:00
|
|
|
)
|
2023-10-16 20:19:08 +00:00
|
|
|
.component(
|
|
|
|
'kubeNodesDatatable',
|
|
|
|
r2a(withUIRouter(withReactQuery(withCurrentUser(NodesDatatable))), [])
|
|
|
|
)
|
2023-02-07 03:33:57 +00:00
|
|
|
.component(
|
|
|
|
'kubeApplicationAccessPolicySelector',
|
|
|
|
r2a(KubeApplicationAccessPolicySelector, [
|
|
|
|
'value',
|
|
|
|
'onChange',
|
|
|
|
'isEdit',
|
|
|
|
'persistedFoldersUseExistingVolumes',
|
|
|
|
])
|
|
|
|
)
|
|
|
|
.component(
|
|
|
|
'kubeApplicationDeploymentTypeSelector',
|
|
|
|
r2a(KubeApplicationDeploymentTypeSelector, [
|
|
|
|
'value',
|
|
|
|
'onChange',
|
|
|
|
'supportGlobalDeployment',
|
|
|
|
])
|
2023-05-03 03:55:25 +00:00
|
|
|
)
|
2023-08-17 10:01:10 +00:00
|
|
|
.component(
|
|
|
|
'kubeYamlInspector',
|
|
|
|
r2a(withUIRouter(withReactQuery(withCurrentUser(YAMLInspector))), [
|
|
|
|
'identifier',
|
|
|
|
'data',
|
2023-08-27 21:01:35 +00:00
|
|
|
'hideMessage',
|
2023-08-17 10:01:10 +00:00
|
|
|
])
|
|
|
|
)
|
2023-10-16 01:08:06 +00:00
|
|
|
.component(
|
|
|
|
'kubeStackName',
|
|
|
|
r2a(withUIRouter(withReactQuery(withCurrentUser(StackName))), [
|
|
|
|
'setStackName',
|
|
|
|
'isAdmin',
|
|
|
|
'stackName',
|
|
|
|
])
|
|
|
|
)
|
2023-05-03 03:55:25 +00:00
|
|
|
.component(
|
|
|
|
'applicationSummaryWidget',
|
|
|
|
r2a(
|
2023-05-31 05:58:41 +00:00
|
|
|
withUIRouter(withReactQuery(withCurrentUser(ApplicationSummaryWidget))),
|
2023-05-03 03:55:25 +00:00
|
|
|
[]
|
|
|
|
)
|
2023-05-29 03:06:14 +00:00
|
|
|
)
|
2023-08-17 10:00:25 +00:00
|
|
|
.component(
|
|
|
|
'applicationContainersDatatable',
|
|
|
|
r2a(
|
|
|
|
withUIRouter(
|
|
|
|
withReactQuery(withCurrentUser(ApplicationContainersDatatable))
|
|
|
|
),
|
|
|
|
[]
|
|
|
|
)
|
|
|
|
)
|
2023-05-29 03:06:14 +00:00
|
|
|
.component(
|
|
|
|
'applicationDetailsWidget',
|
|
|
|
r2a(
|
2023-08-14 04:53:28 +00:00
|
|
|
withUIRouter(withReactQuery(withCurrentUser(ApplicationDetailsWidget))),
|
2023-05-29 03:06:14 +00:00
|
|
|
[]
|
|
|
|
)
|
2023-07-29 15:08:41 +00:00
|
|
|
)
|
2023-08-13 17:09:40 +00:00
|
|
|
.component(
|
|
|
|
'applicationEventsDatatable',
|
|
|
|
r2a(
|
2023-08-14 07:01:31 +00:00
|
|
|
withUIRouter(withReactQuery(withCurrentUser(ApplicationEventsDatatable))),
|
2023-08-13 17:09:40 +00:00
|
|
|
[]
|
|
|
|
)
|
2023-09-20 06:04:26 +00:00
|
|
|
)
|
|
|
|
.component(
|
|
|
|
'kubernetesApplicationsStacksDatatable',
|
|
|
|
r2a(withUIRouter(withCurrentUser(ApplicationsStacksDatatable)), [
|
|
|
|
'dataset',
|
|
|
|
'onRefresh',
|
|
|
|
'onRemove',
|
|
|
|
'namespace',
|
|
|
|
'namespaces',
|
|
|
|
'onNamespaceChange',
|
|
|
|
'isLoading',
|
|
|
|
])
|
2023-05-31 05:58:41 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
export const componentsModule = ngModule.name;
|
|
|
|
|
|
|
|
withFormValidation(
|
|
|
|
ngModule,
|
|
|
|
withUIRouter(withCurrentUser(withReactQuery(KubeServicesForm))),
|
|
|
|
'kubeServicesForm',
|
2023-06-26 04:21:19 +00:00
|
|
|
['values', 'onChange', 'appName', 'selector', 'isEditMode', 'namespace'],
|
2023-05-31 05:58:41 +00:00
|
|
|
kubeServicesValidation
|
|
|
|
);
|