mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 14:29:40 +02:00
refactor(image): refactor the code used in image and image details controller (#705)
This commit is contained in:
parent
c2e63070e6
commit
24b51a7e87
8 changed files with 245 additions and 167 deletions
|
@ -45,14 +45,14 @@ function ($scope, $q, $state, $anchorScroll, Config, ContainerService, Container
|
|||
volumeResourceControlQueries.push(ResourceControlService.setVolumeResourceControl(Authentication.getUserDetails().ID, volume.Name));
|
||||
});
|
||||
}
|
||||
TemplateService.updateContainerConfigurationWithVolumes(templateConfiguration.container, template, data);
|
||||
TemplateService.updateContainerConfigurationWithVolumes(templateConfiguration, template, data);
|
||||
return $q.all(volumeResourceControlQueries)
|
||||
.then(function success() {
|
||||
return ImageService.pullImage(templateConfiguration.image);
|
||||
return ImageService.pullImage(template.Image, template.Registry);
|
||||
});
|
||||
})
|
||||
.then(function success(data) {
|
||||
return ContainerService.createAndStartContainer(templateConfiguration.container);
|
||||
return ContainerService.createAndStartContainer(templateConfiguration);
|
||||
})
|
||||
.then(function success(data) {
|
||||
Messages.send('Container Started', data.Id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue