mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
Fix Inventory Manage > Inventory Sync schedules > add/edit (#2220)
* fix Inventory Manage > Inventory Sync > add/edit, resolves #2164 * fix misassignment / jslint error
This commit is contained in:
parent
7506ee3509
commit
d29889a4bc
@ -526,14 +526,27 @@ export default
|
||||
};
|
||||
|
||||
scope.editSchedule = function(id) {
|
||||
var base = $state.current.name.split(".")[0];
|
||||
$state.go(base + ".edit", {schedule_id: id});
|
||||
if ($state.includes('inventoryManage')){
|
||||
$state.go('inventoryManage.schedules.edit', {schedule_id: id});
|
||||
}
|
||||
else{
|
||||
var base = $state.current.name.split(".")[0];
|
||||
$state.go(base + ".edit", {schedule_id: id});
|
||||
}
|
||||
};
|
||||
|
||||
scope.addSchedule = function() {
|
||||
var base = $state.current.name.split(".")[0];
|
||||
ParamPass.set(scope.schedule_url);
|
||||
$state.go(base + ".add");
|
||||
if ($state.includes('inventoryManage')){
|
||||
scope.schedule_url = parent_scope.current_url.split('?')[0];
|
||||
scope.base = 'inventory';
|
||||
ParamPass.set(scope.base, scope.schedule_url);
|
||||
$state.go('inventoryManage.schedules.add');
|
||||
}
|
||||
else{
|
||||
var base = $state.current.name.split(".")[0];
|
||||
ParamPass.set(scope.schedule_url);
|
||||
$state.go(base + ".add");
|
||||
}
|
||||
};
|
||||
|
||||
scope.refreshSchedules = function() {
|
||||
|
@ -19,7 +19,7 @@ export default ['$compile', '$filter', '$state', '$stateParams', 'AddSchedule',
|
||||
day = $filter('schZeroPad')(dt.getDate(), 2);
|
||||
$scope.$parent.schedulerEndDt = month + '/' + day + '/' + dt.getFullYear();
|
||||
};
|
||||
|
||||
|
||||
// initial end @ midnight values
|
||||
$scope.schedulerEndHour = "00";
|
||||
$scope.schedulerEndMinute = "00";
|
||||
@ -102,7 +102,7 @@ export default ['$compile', '$filter', '$state', '$stateParams', 'AddSchedule',
|
||||
field_id: 'SchedulerForm-extraVars'
|
||||
});
|
||||
}
|
||||
else if ($state.current.name === 'inventoryManageSchedules.add'){
|
||||
else if ($state.current.name === 'inventoryManage.schedules.add'){
|
||||
$scope.extraVars = '---';
|
||||
$scope.parseType = 'yaml';
|
||||
ParseTypeChange({
|
||||
@ -112,7 +112,6 @@ export default ['$compile', '$filter', '$state', '$stateParams', 'AddSchedule',
|
||||
field_id: 'SchedulerForm-extraVars'
|
||||
});
|
||||
}
|
||||
|
||||
AddSchedule({
|
||||
scope: $scope,
|
||||
callback: 'SchedulesRefresh',
|
||||
|
Loading…
Reference in New Issue
Block a user