mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 07:19:41 +02:00
Restart Feature - Implementing restart feature for single containers
This commit is contained in:
parent
2bc6b2995d
commit
c10dc38a89
2 changed files with 15 additions and 0 deletions
|
@ -91,6 +91,17 @@ function($scope, $routeParams, $location, Container, Messages, ViewSpinner) {
|
|||
});
|
||||
};
|
||||
|
||||
$scope.restart = function() {
|
||||
ViewSpinner.spin();
|
||||
Container.restart({id: $routeParams.id}, function(d) {
|
||||
update();
|
||||
Messages.send("Container restarted", $routeParams.id);
|
||||
}, function(e){
|
||||
update();
|
||||
Messages.error("Failure", "Container failed to restart." + e.data);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.hasContent = function(data) {
|
||||
return data !== null && data !== undefined;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue