From e48309b6aa75bc1b3d4147a29dcdb1cf5d180d71 Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Thu, 4 Sep 2014 11:04:37 -0400 Subject: [PATCH] Queued Jobs Changed sort order to asc ID rather than desc ID. Changed delete/cancel icon to always be cancel. The prompt dialog now always shows 'Submit request to cancel' rather than 'Delete...' for jobs with a status == 'new' even though the API request is DELETE. --- awx/ui/static/js/helpers/Jobs.js | 2 +- awx/ui/static/js/lists/QueuedJobs.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/awx/ui/static/js/helpers/Jobs.js b/awx/ui/static/js/helpers/Jobs.js index db22c421f0..b314d490d0 100644 --- a/awx/ui/static/js/helpers/Jobs.js +++ b/awx/ui/static/js/helpers/Jobs.js @@ -511,7 +511,7 @@ function(Find, GetBasePath, Rest, Wait, ProcessErrors, Prompt, Alert){ } scope.removeCancelJob = scope.$on('CancelJob', function() { var body; - body = (action_label === 'cancel') ? "Submit the request to cancel" : "Delete"; + body = (action_label === 'cancel' || job.status === 'new') ? "Submit the request to cancel" : "Delete"; Prompt({ hdr: hdr, body: "
" + body + " job #" + id + " " + job.name + "?
", diff --git a/awx/ui/static/js/lists/QueuedJobs.js b/awx/ui/static/js/lists/QueuedJobs.js index 2cede92695..c9f29a53d3 100644 --- a/awx/ui/static/js/lists/QueuedJobs.js +++ b/awx/ui/static/js/lists/QueuedJobs.js @@ -24,7 +24,6 @@ angular.module('QueuedJobsDefinition', []) label: 'ID', ngClick:"viewJobLog(queued_job.id)", key: true, - desc: true, searchType: 'int', columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2', awToolTip: "{{ queued_job.status_tip }}", @@ -76,10 +75,10 @@ angular.module('QueuedJobsDefinition', []) awToolTip: 'Relaunch using the same parameters', dataPlacement: 'top' }, - "delete": { + 'cancel': { mode: 'all', ngClick: 'deleteJob(queued_job.id)', - awToolTip: 'Delete the job', + awToolTip: 'Cancel the job', dataPlacement: 'top' }, job_details: {