Make restart button always animate

This commit is contained in:
Girish Ramakrishnan
2019-04-05 10:46:35 -07:00
parent 97e57c74e4
commit 744f39623f

View File

@@ -61,14 +61,17 @@ angular.module('Application').controller('SystemController', ['$scope', '$locati
refresh(serviceName, function (error, result) {
if (result.status === 'active') return;
setTimeout(function () { waitForActive(serviceName); }, 1000);
setTimeout(function () { waitForActive(serviceName); }, 3000);
});
}
$scope.services.find(function (s) { return s.name === serviceName; }).status = 'starting';
Client.restartService(serviceName, function (error) {
if (error) return Client.error(error);
waitForActive(serviceName);
// show "busy" indicator for 3 seconds to show some ui activity
setTimeout(function () { waitForActive(serviceName); }, 3000);
});
};