Add cancel action for active app tasks

This commit is contained in:
Girish Ramakrishnan
2019-08-29 14:28:45 -07:00
parent 5387054000
commit 8eee0b809c
3 changed files with 96 additions and 4 deletions

View File

@@ -456,6 +456,29 @@ angular.module('Application').controller('AppsController', ['$scope', '$location
}
};
$scope.appCancel = {
app: {},
busy: false,
show: function (app) {
$scope.appCancel.app = app;
$scope.appCancel.busy = false;
$('#appCancelModal').modal('show');
},
submit: function () {
Client.stopTask($scope.appCancel.app.taskId, function (error) {
if (error) Client.error(error);
$scope.appCancel.busy = false;
$('#appCancelModal').modal('hide');
});
return false; // prevent propagation and default
}
};
$scope.appInfo = {
app: {},
message: ''