Updated serverStatus.js

This would fix infinite loading gif when action is performed on service status page.
This commit is contained in:
jetchirag
2018-07-19 18:22:58 +05:30
committed by GitHub
parent 38b21631d4
commit b167d84705

View File

@@ -403,25 +403,21 @@ app.controller('servicesManager', function($scope,$http) {
if(response.data.serviceAction == 1){
setTimeout(function() {
getServiceStatus();
setTimeout(function() {
$scope.ActionSuccessfull = true;
$scope.ActionFailed = false;
$scope.couldNotConnect = false;
$scope.actionLoader = false;
$scope.btnDisable = false;
},1000)
$scope.ActionSuccessfull = true;
$scope.ActionFailed = false;
$scope.couldNotConnect = false;
$scope.actionLoader = false;
$scope.btnDisable = false;
}, 3000);
}
else{
setTimeout(function() {
getServiceStatus();
setTimeout(function() {
$scope.ActionSuccessfull = false;
$scope.ActionFailed = true;
$scope.couldNotConnect = false;
$scope.actionLoader = false;
$scope.btnDisable = false;
},1000)
$scope.ActionSuccessfull = false;
$scope.ActionFailed = true;
$scope.couldNotConnect = false;
$scope.actionLoader = false;
$scope.btnDisable = false;
}, 5000);
}
@@ -437,4 +433,4 @@ app.controller('servicesManager', function($scope,$http) {
}
});
});