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.
This commit is contained in:
Jared Tabor 2014-12-11 14:47:54 -05:00
parent 96433b07d4
commit f41a6f22bf
2 changed files with 4 additions and 3 deletions

View File

@ -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') {

View File

@ -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',