mirror of https://github.com/portainer/portainer
Merge branch 'crosbymichael-master' into bharat-add-commit
Conflicts: app/components/container/container.htmlpull/2/head
commit
c0ae0d8d3f
|
@ -40,6 +40,10 @@
|
||||||
ng-click="unpause()"
|
ng-click="unpause()"
|
||||||
ng-show="container.State.Running && container.State.Paused">Unpause
|
ng-show="container.State.Running && container.State.Paused">Unpause
|
||||||
</button>
|
</button>
|
||||||
|
<button class="btn btn-success"
|
||||||
|
ng-click="restart()"
|
||||||
|
ng-show="container.State.Running && !container.State.Stopped">Restart
|
||||||
|
</button>
|
||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary"
|
||||||
ng-click="commit()"
|
ng-click="commit()"
|
||||||
ng-show="container.State.Running && !container.State.Paused">Commit
|
ng-show="container.State.Running && !container.State.Paused">Commit
|
||||||
|
|
|
@ -101,6 +101,17 @@ function($scope, $routeParams, $location, Container, ContainerCommit, Messages,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$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) {
|
$scope.hasContent = function(data) {
|
||||||
return data !== null && data !== undefined;
|
return data !== null && data !== undefined;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue