1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-20 22:09:41 +02:00

feat(container-details): display loading when using recreate (#1471)

This commit is contained in:
Anthony Lapenna 2017-12-05 17:46:11 +01:00 committed by GitHub
parent 283faca4f7
commit f3a23c7dd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -8,6 +8,7 @@ function ($q, $scope, $state, $transition$, $filter, Container, ContainerCommit,
Registry: ''
};
$scope.state = {
recreateContainerInProgress: false,
joinNetworkInProgress: false,
leaveNetworkInProgress: false,
pagination_count: Pagination.getPaginationCount('container_networks')
@ -207,6 +208,7 @@ function ($q, $scope, $state, $transition$, $filter, Container, ContainerCommit,
function recreateContainer(pullImage) {
var container = $scope.container;
var config = ContainerHelper.configFromContainer(container.Model);
$scope.state.recreateContainerInProgress = true;
ContainerService.remove(container, true)
.then(function success() {
return RegistryService.retrieveRegistryFromRepository(container.Config.Image);
@ -239,6 +241,7 @@ function ($q, $scope, $state, $transition$, $filter, Container, ContainerCommit,
})
.catch(function error(err) {
Notifications.error('Failure', err, 'Unable to re-create container');
$scope.state.recreateContainerInProgress = false;
});
}