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:
parent
283faca4f7
commit
f3a23c7dd1
2 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue