mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
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:
commit
d6b0a08f32
@ -156,7 +156,7 @@ export default
|
||||
};
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
.factory('JobsListUpdate', ['Rest', function(Rest) {
|
||||
return function(params) {
|
||||
var scope = params.scope,
|
||||
@ -343,9 +343,12 @@ export default
|
||||
scope.search(scope.iterator);
|
||||
}
|
||||
})
|
||||
.error(function() {
|
||||
.error(function(obj, status) {
|
||||
Wait('stop');
|
||||
$('#prompt-modal').modal('hide');
|
||||
if (status === 403) {
|
||||
Alert('Error', obj.detail);
|
||||
}
|
||||
// Ignore the error. The job most likely already finished.
|
||||
// ProcessErrors(scope, data, status, null, { hdr: 'Error!', msg: 'Call to ' + url +
|
||||
// ' failed. POST returned status: ' + status });
|
||||
@ -361,9 +364,12 @@ export default
|
||||
scope.search(scope.iterator);
|
||||
}
|
||||
})
|
||||
.error(function () {
|
||||
.error(function (obj, status) {
|
||||
Wait('stop');
|
||||
$('#prompt-modal').modal('hide');
|
||||
if (status === 403) {
|
||||
Alert('Error', obj.detail);
|
||||
}
|
||||
// Ignore the error. The job most likely already finished.
|
||||
//ProcessErrors(scope, data, status, null, { hdr: 'Error!', msg: 'Call to ' + url +
|
||||
// ' failed. DELETE returned status: ' + status });
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user