Merge pull request #2265 from anoek/2076

Display error when trying to delete a job you don't have access to
This commit is contained in:
Akita Noek
2016-06-09 13:20:11 -04:00

View File

@@ -343,9 +343,12 @@ export default
scope.search(scope.iterator); scope.search(scope.iterator);
} }
}) })
.error(function() { .error(function(obj, status) {
Wait('stop'); Wait('stop');
$('#prompt-modal').modal('hide'); $('#prompt-modal').modal('hide');
if (status === 403) {
Alert('Error', obj.detail);
}
// Ignore the error. The job most likely already finished. // Ignore the error. The job most likely already finished.
// ProcessErrors(scope, data, status, null, { hdr: 'Error!', msg: 'Call to ' + url + // ProcessErrors(scope, data, status, null, { hdr: 'Error!', msg: 'Call to ' + url +
// ' failed. POST returned status: ' + status }); // ' failed. POST returned status: ' + status });
@@ -361,9 +364,12 @@ export default
scope.search(scope.iterator); scope.search(scope.iterator);
} }
}) })
.error(function () { .error(function (obj, status) {
Wait('stop'); Wait('stop');
$('#prompt-modal').modal('hide'); $('#prompt-modal').modal('hide');
if (status === 403) {
Alert('Error', obj.detail);
}
// Ignore the error. The job most likely already finished. // Ignore the error. The job most likely already finished.
//ProcessErrors(scope, data, status, null, { hdr: 'Error!', msg: 'Call to ' + url + //ProcessErrors(scope, data, status, null, { hdr: 'Error!', msg: 'Call to ' + url +
// ' failed. DELETE returned status: ' + status }); // ' failed. DELETE returned status: ' + status });