fix(stacks): prevent stack creation when container_name already exists (#5211)

fix/EE-1152/importing-images
Chaim Lev-Ari 2021-07-21 04:55:06 +03:00 committed by GitHub
parent 00fc629c1c
commit 592f7024e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -232,8 +232,8 @@ angular
}
try {
$scope.containers = await ContainerService.containers();
$scope.containerNames = ContainerHelper.getContainerNames($scope.containers);
const containers = await ContainerService.containers(true);
$scope.containerNames = ContainerHelper.getContainerNames(containers);
} catch (err) {
Notifications.error('Failure', err, 'Unable to retrieve Containers');
}

View File

@ -291,7 +291,7 @@ angular.module('portainer.app').controller('StackController', [
$q.all({
stack: StackService.stack(id),
groups: GroupService.groups(),
containers: ContainerService.containers(),
containers: ContainerService.containers(true),
})
.then(function success(data) {
var stack = data.stack;