mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
correctly cancel/delete on job details
related to #4620 * Changed cancel prompt buttons from "Cancel" "Cancel" to "Cancel" "Proceed", talk about some confusing shit. * Removed copy and pasted code that would call a delete upon canceling a job * Don't expect job_status to be an object in the view, just `job_status`, not `job_status.status`
This commit is contained in:
parent
3b766cb3e3
commit
c67989bc90
@ -36,9 +36,9 @@
|
||||
<button class="List-actionButton
|
||||
List-actionButton--delete"
|
||||
data-placement="top"
|
||||
ng-click="deleteJob()"
|
||||
ng-show="job_status.status == 'running' ||
|
||||
job_status.status=='pending' "
|
||||
ng-click="cancelJob()"
|
||||
ng-show="job_status == 'running' ||
|
||||
job_status=='pending' "
|
||||
aw-tool-tip="Cancel"
|
||||
data-original-title="" title="">
|
||||
<i class="fa fa-minus-circle"></i>
|
||||
@ -49,8 +49,8 @@
|
||||
List-actionButton--delete"
|
||||
data-placement="top"
|
||||
ng-click="deleteJob()"
|
||||
ng-hide="job_status.status == 'running' ||
|
||||
job_status.status == 'pending' "
|
||||
ng-hide="job_status == 'running' ||
|
||||
job_status == 'pending' "
|
||||
aw-tool-tip="Delete"
|
||||
data-original-title=""
|
||||
title="">
|
||||
|
||||
@ -171,22 +171,8 @@ function ($q, Prompt, $filter, Wait, Rest, $state, ProcessErrors, InitiatePlaybo
|
||||
});
|
||||
}
|
||||
});
|
||||
Rest.destroy()
|
||||
.success(function() {
|
||||
Wait('stop');
|
||||
$('#prompt-modal').modal('hide');
|
||||
})
|
||||
.error(function(obj, status) {
|
||||
Wait('stop');
|
||||
$('#prompt-modal').modal('hide');
|
||||
ProcessErrors(null, obj, status, null, {
|
||||
hdr: 'Error!',
|
||||
msg: `Could not cancel job.
|
||||
Returned status: ${status}`
|
||||
});
|
||||
});
|
||||
},
|
||||
actionText: 'CANCEL'
|
||||
actionText: 'PROCEED'
|
||||
});
|
||||
},
|
||||
relaunchJob: function(scope) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user