From d494a7c4c84c016c5074ecc523c14ba227c9fc9f Mon Sep 17 00:00:00 2001 From: jetchirag Date: Thu, 19 Jul 2018 18:22:58 +0530 Subject: [PATCH] Updated serverStatus.js This would fix infinite loading gif when action is performed on service status page. --- .../static/serverStatus/serverStatus.js | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/serverStatus/static/serverStatus/serverStatus.js b/serverStatus/static/serverStatus/serverStatus.js index f3b0624c6..e52d380fe 100644 --- a/serverStatus/static/serverStatus/serverStatus.js +++ b/serverStatus/static/serverStatus/serverStatus.js @@ -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) { } -}); \ No newline at end of file +});