mirror of https://github.com/portainer/portainer
fix(ui): add controlled input
parent
f94fb7fedd
commit
1afaf01495
|
@ -14,7 +14,7 @@ import { EdgeGroupAssociationTable } from '@/react/edge/components/EdgeGroupAsso
|
|||
import { AssociatedEdgeEnvironmentsSelector } from '@/react/edge/components/AssociatedEdgeEnvironmentsSelector';
|
||||
import { EnvironmentsDatatable } from '@/react/edge/edge-stacks/ItemView/EnvironmentsDatatable';
|
||||
|
||||
export const componentsModule = angular
|
||||
const ngModule = angular
|
||||
.module('portainer.edge.react.components', [])
|
||||
.component(
|
||||
'edgeStackEnvironmentsDatatable',
|
||||
|
@ -100,4 +100,6 @@ export const componentsModule = angular
|
|||
'onChange',
|
||||
'value',
|
||||
])
|
||||
).name;
|
||||
);
|
||||
|
||||
export const componentsModule = ngModule.name;
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
import angular from 'angular';
|
||||
|
||||
export const applicationsModule = angular.module(
|
||||
'portainer.kubernetes.react.components.applications',
|
||||
[]
|
||||
).name;
|
|
@ -3,7 +3,6 @@ import angular from 'angular';
|
|||
import { r2a } from '@/react-tools/react2angular';
|
||||
import { IngressClassDatatable } from '@/react/kubernetes/cluster/ingressClass/IngressClassDatatable';
|
||||
import { NamespacesSelector } from '@/react/kubernetes/cluster/RegistryAccessView/NamespacesSelector';
|
||||
import { StorageAccessModeSelector } from '@/react/kubernetes/cluster/ConfigureView/StorageAccessModeSelector';
|
||||
import { NamespaceAccessUsersSelector } from '@/react/kubernetes/namespaces/AccessView/NamespaceAccessUsersSelector';
|
||||
import { CreateNamespaceRegistriesSelector } from '@/react/kubernetes/namespaces/CreateView/CreateNamespaceRegistriesSelector';
|
||||
import { KubeApplicationAccessPolicySelector } from '@/react/kubernetes/applications/CreateView/KubeApplicationAccessPolicySelector';
|
||||
|
@ -18,6 +17,7 @@ import {
|
|||
} from '@/react/kubernetes/applications/DetailsView';
|
||||
import { withFormValidation } from '@/react-tools/withFormValidation';
|
||||
import { withCurrentUser } from '@/react-tools/withCurrentUser';
|
||||
import { withControlledInput } from '@/react-tools/withControlledInput';
|
||||
|
||||
export const ngModule = angular
|
||||
.module('portainer.kubernetes.react.components', [])
|
||||
|
@ -45,16 +45,6 @@ export const ngModule = angular
|
|||
'value',
|
||||
])
|
||||
)
|
||||
.component(
|
||||
'storageAccessModeSelector',
|
||||
r2a(StorageAccessModeSelector, [
|
||||
'inputId',
|
||||
'onChange',
|
||||
'options',
|
||||
'value',
|
||||
'storageClassName',
|
||||
])
|
||||
)
|
||||
.component(
|
||||
'namespaceAccessUsersSelector',
|
||||
r2a(NamespaceAccessUsersSelector, [
|
||||
|
@ -112,7 +102,13 @@ export const componentsModule = ngModule.name;
|
|||
|
||||
withFormValidation(
|
||||
ngModule,
|
||||
withUIRouter(withCurrentUser(withReactQuery(KubeServicesForm))),
|
||||
withUIRouter(
|
||||
withCurrentUser(
|
||||
withReactQuery(
|
||||
withControlledInput(KubeServicesForm, { values: 'onChange' })
|
||||
)
|
||||
)
|
||||
),
|
||||
'kubeServicesForm',
|
||||
['values', 'onChange', 'appName', 'selector', 'isEditMode', 'namespace'],
|
||||
kubeServicesValidation
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
import angular from 'angular';
|
||||
|
||||
import { r2a } from '@/react-tools/react2angular';
|
||||
import { ImportFdoDeviceButton } from '@/react/portainer/environments/ListView/ImportFdoDeviceButton';
|
||||
import { withUIRouter } from '@/react-tools/withUIRouter';
|
||||
import { withReactQuery } from '@/react-tools/withReactQuery';
|
||||
|
||||
export const envListModule = angular
|
||||
.module('portainer.app.react.components.environments.list-view', [])
|
||||
.component(
|
||||
'importFdoDeviceButton',
|
||||
r2a(withUIRouter(withReactQuery(ImportFdoDeviceButton)), [])
|
||||
).name;
|
|
@ -21,7 +21,6 @@ import { PageHeader } from '@@/PageHeader';
|
|||
import { TagSelector } from '@@/TagSelector';
|
||||
import { Loading } from '@@/Widget/Loading';
|
||||
import { PasswordCheckHint } from '@@/PasswordCheckHint';
|
||||
import { ViewLoading } from '@@/ViewLoading';
|
||||
import { Tooltip } from '@@/Tip/Tooltip';
|
||||
import { Badge } from '@@/Badge';
|
||||
import { TableColumnHeaderAngular } from '@@/datatables/TableHeaderCell';
|
||||
|
@ -43,14 +42,12 @@ import { gitFormModule } from './git-form';
|
|||
import { settingsModule } from './settings';
|
||||
import { accessControlModule } from './access-control';
|
||||
import { environmentsModule } from './environments';
|
||||
import { envListModule } from './environments-list-view-components';
|
||||
import { registriesModule } from './registries';
|
||||
|
||||
export const ngModule = angular
|
||||
.module('portainer.app.react.components', [
|
||||
accessControlModule,
|
||||
customTemplatesModule,
|
||||
envListModule,
|
||||
environmentsModule,
|
||||
gitFormModule,
|
||||
registriesModule,
|
||||
|
@ -104,7 +101,6 @@ export const ngModule = angular
|
|||
'isSortedDesc',
|
||||
])
|
||||
)
|
||||
.component('viewLoading', r2a(ViewLoading, ['message']))
|
||||
.component(
|
||||
'pageHeader',
|
||||
r2a(withUIRouter(withReactQuery(withCurrentUser(PageHeader))), [
|
||||
|
@ -191,7 +187,6 @@ export const ngModule = angular
|
|||
'dataCy',
|
||||
])
|
||||
)
|
||||
|
||||
.component(
|
||||
'reactCodeEditor',
|
||||
r2a(CodeEditor, [
|
||||
|
|
Loading…
Reference in New Issue