Fix restart callback
This commit is contained in:
parent
0cea847f27
commit
8e0c1a7d74
3 changed files with 8 additions and 10 deletions
|
@ -1278,11 +1278,9 @@ quayApp = angular.module('quay', quayDependencies, function($provide, cfpLoading
|
||||||
$provide.factory('ContainerService', ['ApiService', '$timeout',
|
$provide.factory('ContainerService', ['ApiService', '$timeout',
|
||||||
function(ApiService, $timeout) {
|
function(ApiService, $timeout) {
|
||||||
var containerService = {};
|
var containerService = {};
|
||||||
containerService.restartContainer = function() {
|
containerService.restartContainer = function(callback) {
|
||||||
ApiService.scShutdownContainer(null, null).then(function(resp) {
|
ApiService.scShutdownContainer(null, null).then(function(resp) {
|
||||||
$timeout(function() {
|
$timeout(callback, 2000);
|
||||||
containerService.checkStatus();
|
|
||||||
}, 2000);
|
|
||||||
}, ApiService.errorDisplay('Cannot restart container. Please report this to support.'))
|
}, ApiService.errorDisplay('Cannot restart container. Please report this to support.'))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -104,8 +104,9 @@ function SetupCtrl($scope, $timeout, ApiService, Features, UserService, Containe
|
||||||
|
|
||||||
$scope.restartContainer = function(state) {
|
$scope.restartContainer = function(state) {
|
||||||
$scope.currentStep = state;
|
$scope.currentStep = state;
|
||||||
ContainerService.restartContainer();
|
ContainerService.restartContainer(function() {
|
||||||
$scope.checkStatus();
|
$scope.checkStatus()
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.showSuperuserPanel = function() {
|
$scope.showSuperuserPanel = function() {
|
||||||
|
|
|
@ -194,10 +194,9 @@ function SuperUserAdminCtrl($scope, $timeout, ApiService, Features, UserService,
|
||||||
backdrop: 'static'
|
backdrop: 'static'
|
||||||
});
|
});
|
||||||
|
|
||||||
ContainerService.restartContainer();
|
ContainerService.restartContainer(function() {
|
||||||
$timeout(function() {
|
$scope.checkStatus()
|
||||||
$scope.checkStatus();
|
});
|
||||||
}, 2000);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.checkStatus = function() {
|
$scope.checkStatus = function() {
|
||||||
|
|
Reference in a new issue