mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 04:10:44 -03:30
Adjusts which partical/controller combination is used when editing a schedule
MGMT jobs require a different partial + controller
This commit is contained in:
parent
220b45cb8a
commit
429cf40db3
@ -345,9 +345,26 @@ const jobsSchedulesEditRoute = {
|
||||
label: "{{breadcrumb.schedule_name}}"
|
||||
},
|
||||
views: {
|
||||
'form': {
|
||||
controller: 'schedulerEditController',
|
||||
templateUrl: templateUrl("scheduler/schedulerForm"),
|
||||
'form':{
|
||||
templateProvider: function(ParentObject, Rest){
|
||||
let path;
|
||||
if(ParentObject.type === 'system_job_template'){
|
||||
path = templateUrl('management-jobs/scheduler/schedulerForm');
|
||||
}
|
||||
else {
|
||||
path = templateUrl('scheduler/schedulerForm');
|
||||
}
|
||||
Rest.setUrl(path);
|
||||
return Rest.get(path).then(response => response.data);
|
||||
},
|
||||
controllerProvider: function(ParentObject){
|
||||
if (ParentObject.type === 'system_job_template') {
|
||||
return 'managementJobEditController';
|
||||
}
|
||||
else {
|
||||
return 'schedulerEditController';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
resolve: _.merge(editScheduleResolve(), parentResolve)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user