removing vars from schedules for project syncs and inv syncs

This commit is contained in:
Jared Tabor 2017-08-14 19:30:42 -07:00
parent 738fff65a1
commit 10519317f4
3 changed files with 22 additions and 27 deletions

View File

@ -134,24 +134,10 @@ export default ['$filter', '$state', '$stateParams', 'AddSchedule', 'Wait',
});
}
else if ($state.current.name === 'projectSchedules.add'){
$scope.extraVars = '---';
$scope.parseType = 'yaml';
ParseTypeChange({
scope: $scope,
variable: 'extraVars',
parse_variable: 'parseType',
field_id: 'SchedulerForm-extraVars'
});
$scope.noVars = true;
}
else if ($state.current.name === 'inventoryManage.editGroup.schedules.add'){
$scope.extraVars = '---';
$scope.parseType = 'yaml';
ParseTypeChange({
scope: $scope,
variable: 'extraVars',
parse_variable: 'parseType',
field_id: 'SchedulerForm-extraVars'
});
else if ($state.current.name === 'inventories.edit.inventory_sources.edit.schedules.add'){
$scope.noVars = true;
}
AddSchedule({
scope: $scope,

View File

@ -93,15 +93,24 @@ function($filter, $state, $stateParams, EditSchedule, Wait, $scope, $rootScope,
// extra_data field is not manifested in the UI when scheduling a Management Job
if ($state.current.name !== 'managementJobsList.schedule.add' && $state.current.name !== 'managementJobsList.schedule.edit'){
$scope.$on('ScheduleFound', function(){
let readOnly = !$scope.schedule_obj.summary_fields.user_capabilities
.edit;
ParseTypeChange({
scope: $scope,
variable: 'extraVars',
parse_variable: 'parseType',
field_id: 'SchedulerForm-extraVars',
readOnly: readOnly
});
if ($state.current.name === 'projectSchedules.edit'){
$scope.noVars = true;
}
else if ($state.current.name === 'inventories.edit.inventory_sources.edit.schedules.edit'){
$scope.noVars = true;
}
else {
let readOnly = !$scope.schedule_obj.summary_fields.user_capabilities
.edit;
ParseTypeChange({
scope: $scope,
variable: 'extraVars',
parse_variable: 'parseType',
field_id: 'SchedulerForm-extraVars',
readOnly: readOnly
});
}
});
}

View File

@ -636,7 +636,7 @@
</ul>
</div>
<div class="form-group Form-formGroup Form-textAreaLabel Form-formGroup--fullWidth">
<div class="form-group Form-formGroup Form-textAreaLabel Form-formGroup--fullWidth" ng-hide="noVars">
<label for="Scheduler-extraVars">
<span class="Form-inputLabel">
Extra Variables