Show app cancel busy indicator

This commit is contained in:
Girish Ramakrishnan
2019-08-29 14:51:21 -07:00
parent 45d40297bf
commit 2796ad12fe

View File

@@ -468,13 +468,18 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
},
submit: function () {
$scope.appCancel.busy = true;
Client.stopTask($scope.appCancel.app.taskId, function (error) {
if (error) Client.error(error);
$scope.appCancel.busy = false;
Client.refreshAppCache($scope.appCancel.app.id); // reflect the new app state immediately
setTimeout(function () { // small delay for UI
$scope.appCancel.busy = false;
$('#appCancelModal').modal('hide');
Client.refreshAppCache($scope.appCancel.app.id); // reflect the new app state immediately
$('#appCancelModal').modal('hide');
}, 1000);
});
return false; // prevent propagation and default