mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 11:11:07 -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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user