mirror of
https://github.com/ansible/awx.git
synced 2026-01-10 15:32:07 -03:30
removing vars from schedules for project syncs and inv syncs
This commit is contained in:
parent
738fff65a1
commit
10519317f4
@ -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,
|
||||
|
||||
@ -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
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user