mirror of
https://github.com/ansible/awx.git
synced 2026-03-28 22:35:08 -02:30
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:
@@ -60,7 +60,7 @@ angular.module('JobsHelper', ['Utilities', 'RestServices', 'FormGenerator', 'Job
|
|||||||
else if (job.type === 'project_update') {
|
else if (job.type === 'project_update') {
|
||||||
typeId = job.project;
|
typeId = job.project;
|
||||||
}
|
}
|
||||||
else if (job.type === 'job') {
|
else if (job.type === 'job' || job.type === "system_job") {
|
||||||
typeId = job.id;
|
typeId = job.id;
|
||||||
}
|
}
|
||||||
RelaunchJob({ scope: scope, id: typeId, type: job.type, name: job.name });
|
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') {
|
if (type === 'inventory_update') {
|
||||||
RelaunchInventory({ scope: scope, id: id});
|
RelaunchInventory({ scope: scope, id: id});
|
||||||
}
|
}
|
||||||
else if (type === 'job') {
|
else if (type === 'job' || type === 'system_job') {
|
||||||
RelaunchPlaybook({ scope: scope, id: id, name: name });
|
RelaunchPlaybook({ scope: scope, id: id, name: name });
|
||||||
}
|
}
|
||||||
else if (type === 'project_update') {
|
else if (type === 'project_update') {
|
||||||
|
|||||||
@@ -89,7 +89,8 @@ angular.module('CompletedJobsDefinition', [])
|
|||||||
mode: 'all',
|
mode: 'all',
|
||||||
ngClick: 'relaunchJob($event, completed_job.id)',
|
ngClick: 'relaunchJob($event, completed_job.id)',
|
||||||
awToolTip: 'Relaunch using the same parameters',
|
awToolTip: 'Relaunch using the same parameters',
|
||||||
dataPlacement: 'top'
|
dataPlacement: 'top',
|
||||||
|
ngHide: "completed_job.type == 'system_job' "
|
||||||
},
|
},
|
||||||
"delete": {
|
"delete": {
|
||||||
mode: 'all',
|
mode: 'all',
|
||||||
|
|||||||
Reference in New Issue
Block a user