mirror of
https://github.com/portainer/portainer.git
synced 2025-08-08 23:35:31 +02:00
refactor(docker/containers): migrate commands tab to react [EE-5208] (#10085)
This commit is contained in:
parent
46e73ee524
commit
f7366d9788
42 changed files with 1783 additions and 951 deletions
|
@ -1,3 +1,4 @@
|
|||
import { commandStringToArray } from '@/docker/helpers/containers';
|
||||
import { DockerHubViewModel } from 'Portainer/models/dockerhub';
|
||||
import { TemplateViewModel } from '../../models/template';
|
||||
|
||||
|
@ -60,7 +61,7 @@ function TemplateServiceFactory($q, Templates, TemplateHelper, ImageHelper, Cont
|
|||
configuration.name = containerName;
|
||||
configuration.Hostname = template.Hostname;
|
||||
configuration.Env = TemplateHelper.EnvToStringArray(template.Env);
|
||||
configuration.Cmd = ContainerHelper.commandStringToArray(template.Command);
|
||||
configuration.Cmd = commandStringToArray(template.Command);
|
||||
var portConfiguration = TemplateHelper.portArrayToPortConfiguration(template.Ports);
|
||||
configuration.HostConfig.PortBindings = portConfiguration.bindings;
|
||||
configuration.ExposedPorts = portConfiguration.exposedPorts;
|
||||
|
|
|
@ -65,7 +65,7 @@ export function parseAxiosError(
|
|||
let resultMsg = msg;
|
||||
|
||||
if (isAxiosError(err)) {
|
||||
const { error, details } = parseError(err as AxiosError);
|
||||
const { error, details } = parseError(err);
|
||||
resultErr = error;
|
||||
if (msg && details) {
|
||||
resultMsg = `${msg}: ${details}`;
|
||||
|
|
|
@ -10,7 +10,7 @@ import { isEdgeEnvironment, isDockerAPIEnvironment } from '@/react/portainer/env
|
|||
import { commandsTabs } from '@/react/edge/components/EdgeScriptForm/scripts';
|
||||
import { confirmDisassociate } from '@/react/portainer/environments/ItemView/ConfirmDisassociateModel';
|
||||
import { buildConfirmButton } from '@@/modals/utils';
|
||||
import { getInfo } from '@/docker/services/system.service';
|
||||
import { getInfo } from '@/react/docker/proxy/queries/useInfo';
|
||||
|
||||
angular.module('portainer.app').controller('EndpointController', EndpointController);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue