From f41a6f22bfed1c87f3ba989bf58eee5667078421 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Thu, 11 Dec 2014 14:47:54 -0500 Subject: [PATCH] Hide 'relaunch' icon for system jobs system jobs don't have a relaunch resource, therefore we don't want the user thinking that they can relaunch these jobs. --- awx/ui/static/js/helpers/Jobs.js | 4 ++-- awx/ui/static/js/lists/CompletedJobs.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/awx/ui/static/js/helpers/Jobs.js b/awx/ui/static/js/helpers/Jobs.js index 3ce544baa1..e161167605 100644 --- a/awx/ui/static/js/helpers/Jobs.js +++ b/awx/ui/static/js/helpers/Jobs.js @@ -60,7 +60,7 @@ angular.module('JobsHelper', ['Utilities', 'RestServices', 'FormGenerator', 'Job else if (job.type === 'project_update') { typeId = job.project; } - else if (job.type === 'job') { + else if (job.type === 'job' || job.type === "system_job") { typeId = job.id; } RelaunchJob({ scope: scope, id: typeId, type: job.type, name: job.name }); @@ -118,7 +118,7 @@ angular.module('JobsHelper', ['Utilities', 'RestServices', 'FormGenerator', 'Job if (type === 'inventory_update') { RelaunchInventory({ scope: scope, id: id}); } - else if (type === 'job') { + else if (type === 'job' || type === 'system_job') { RelaunchPlaybook({ scope: scope, id: id, name: name }); } else if (type === 'project_update') { diff --git a/awx/ui/static/js/lists/CompletedJobs.js b/awx/ui/static/js/lists/CompletedJobs.js index de334bfcb8..136a0e3af3 100644 --- a/awx/ui/static/js/lists/CompletedJobs.js +++ b/awx/ui/static/js/lists/CompletedJobs.js @@ -89,7 +89,8 @@ angular.module('CompletedJobsDefinition', []) mode: 'all', ngClick: 'relaunchJob($event, completed_job.id)', awToolTip: 'Relaunch using the same parameters', - dataPlacement: 'top' + dataPlacement: 'top', + ngHide: "completed_job.type == 'system_job' " }, "delete": { mode: 'all',