mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 22:39:41 +02:00
refactor(containers): migrate create view to react [EE-2307] (#9175)
This commit is contained in:
parent
bc0050a7b4
commit
d970f0e2bc
71 changed files with 2612 additions and 1399 deletions
|
@ -1,47 +1,9 @@
|
|||
import angular from 'angular';
|
||||
import { ComponentProps } from 'react';
|
||||
|
||||
import { withUIRouter } from '@/react-tools/withUIRouter';
|
||||
import { withReactQuery } from '@/react-tools/withReactQuery';
|
||||
import { withFormValidation } from '@/react-tools/withFormValidation';
|
||||
import { r2a } from '@/react-tools/react2angular';
|
||||
import { withCurrentUser } from '@/react-tools/withCurrentUser';
|
||||
import { withUIRouter } from '@/react-tools/withUIRouter';
|
||||
import { r2a } from '@/react-tools/react2angular';
|
||||
import { ContainerNetworksDatatable } from '@/react/docker/containers/ItemView/ContainerNetworksDatatable';
|
||||
import {
|
||||
CommandsTab,
|
||||
CommandsTabValues,
|
||||
commandsTabValidation,
|
||||
} from '@/react/docker/containers/CreateView/CommandsTab';
|
||||
import {
|
||||
EnvVarsTab,
|
||||
envVarsTabUtils,
|
||||
} from '@/react/docker/containers/CreateView/EnvVarsTab';
|
||||
import {
|
||||
VolumesTab,
|
||||
volumesTabUtils,
|
||||
} from '@/react/docker/containers/CreateView/VolumesTab';
|
||||
import {
|
||||
networkTabUtils,
|
||||
NetworkTab,
|
||||
type NetworkTabValues,
|
||||
} from '@/react/docker/containers/CreateView/NetworkTab';
|
||||
import {
|
||||
ResourcesTab,
|
||||
resourcesTabUtils,
|
||||
type ResourcesTabValues,
|
||||
} from '@/react/docker/containers/CreateView/ResourcesTab';
|
||||
import {
|
||||
CapabilitiesTab,
|
||||
capabilitiesTabUtils,
|
||||
} from '@/react/docker/containers/CreateView/CapabilitiesTab';
|
||||
import {
|
||||
RestartPolicyTab,
|
||||
restartPolicyTabUtils,
|
||||
} from '@/react/docker/containers/CreateView/RestartPolicyTab';
|
||||
import {
|
||||
LabelsTab,
|
||||
labelsTabUtils,
|
||||
} from '@/react/docker/containers/CreateView/LabelsTab';
|
||||
|
||||
const ngModule = angular
|
||||
.module('portainer.docker.react.components.containers', [])
|
||||
|
@ -55,74 +17,3 @@ const ngModule = angular
|
|||
);
|
||||
|
||||
export const containersModule = ngModule.name;
|
||||
|
||||
withFormValidation<ComponentProps<typeof CommandsTab>, CommandsTabValues>(
|
||||
ngModule,
|
||||
withUIRouter(withReactQuery(CommandsTab)),
|
||||
'dockerCreateContainerCommandsTab',
|
||||
['apiVersion'],
|
||||
commandsTabValidation
|
||||
);
|
||||
|
||||
withFormValidation(
|
||||
ngModule,
|
||||
withUIRouter(withReactQuery(EnvVarsTab)),
|
||||
'dockerCreateContainerEnvVarsTab',
|
||||
[],
|
||||
envVarsTabUtils.validation
|
||||
);
|
||||
|
||||
withFormValidation(
|
||||
ngModule,
|
||||
withUIRouter(withReactQuery(VolumesTab)),
|
||||
'dockerCreateContainerVolumesTab',
|
||||
['allowBindMounts'],
|
||||
volumesTabUtils.validation
|
||||
);
|
||||
|
||||
withFormValidation<ComponentProps<typeof NetworkTab>, NetworkTabValues>(
|
||||
ngModule,
|
||||
withUIRouter(withReactQuery(NetworkTab)),
|
||||
'dockerCreateContainerNetworkTab',
|
||||
[],
|
||||
networkTabUtils.validation
|
||||
);
|
||||
|
||||
withFormValidation<ComponentProps<typeof ResourcesTab>, ResourcesTabValues>(
|
||||
ngModule,
|
||||
withUIRouter(withReactQuery(ResourcesTab)),
|
||||
'dockerCreateContainerResourcesTab',
|
||||
[
|
||||
'allowPrivilegedMode',
|
||||
'isDevicesFieldVisible',
|
||||
'isInitFieldVisible',
|
||||
'isSysctlFieldVisible',
|
||||
'isDuplicate',
|
||||
'isImageInvalid',
|
||||
'redeploy',
|
||||
],
|
||||
resourcesTabUtils.validation
|
||||
);
|
||||
|
||||
withFormValidation(
|
||||
ngModule,
|
||||
CapabilitiesTab,
|
||||
'dockerCreateContainerCapabilitiesTab',
|
||||
[],
|
||||
capabilitiesTabUtils.validation
|
||||
);
|
||||
withFormValidation(
|
||||
ngModule,
|
||||
RestartPolicyTab,
|
||||
'dockerCreateContainerRestartPolicyTab',
|
||||
[],
|
||||
restartPolicyTabUtils.validation
|
||||
);
|
||||
|
||||
withFormValidation(
|
||||
ngModule,
|
||||
withUIRouter(withReactQuery(LabelsTab)),
|
||||
'dockerCreateContainerLabelsTab',
|
||||
[],
|
||||
labelsTabUtils.validation
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue