1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-31 03:09:44 +02:00

extension(storidge): support cluster shutdown (#1589)

This commit is contained in:
Anthony Lapenna 2018-01-23 09:49:29 +01:00 committed by GitHub
parent 173ea372c2
commit 0d0072a50e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 6 deletions

View file

@ -42,8 +42,18 @@ function ($q, $scope, $state, Notifications, StoridgeClusterService, StoridgeNod
};
function shutdownCluster() {
Notifications.error('Not implemented', {}, 'Not implemented yet');
$state.reload();
$scope.state.shutdownInProgress = true;
StoridgeClusterService.shutdown()
.then(function success(data) {
Notifications.success('Cluster successfully shutdown');
$state.go('dashboard');
})
.catch(function error(err) {
Notifications.error('Failure', err, 'Unable to shutdown cluster');
})
.finally(function final() {
$scope.state.shutdownInProgress = false;
});
}
function rebootCluster() {