mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
fix parseTypeChange params in Projects, Inventory Source, Job Templates extra vars fields, resolves #2866 (#2878)
This commit is contained in:
parent
5599b3fd1e
commit
34523d59a2
@ -78,11 +78,11 @@ export default ['$compile', '$filter', '$state', '$stateParams', 'AddSchedule',
|
||||
// extra_data field is not manifested in the UI when scheduling a Management Job
|
||||
if ($state.current.name === 'jobTemplateSchedules.add'){
|
||||
$scope.parseType = 'yaml';
|
||||
// grab any existing extra_vars from parent job_template
|
||||
var defaultUrl = GetBasePath('job_templates') + $stateParams.id + '/';
|
||||
Rest.setUrl(defaultUrl);
|
||||
Rest.get().then(function(res){
|
||||
// sanitize
|
||||
var data = JSON.parse(JSON.stringify(res.data.extra_vars));
|
||||
var data = res.data.extra_vars;
|
||||
$scope.extraVars = data === '' ? '---' : data;
|
||||
ParseTypeChange({
|
||||
scope: $scope,
|
||||
|
@ -630,8 +630,8 @@
|
||||
</a>
|
||||
|
||||
<div class="parse-selection">
|
||||
<input type="radio" ng-model="parseType" ng-change="parseTypeChange()" value="yaml"><span class="parse-label">YAML</span>
|
||||
<input type="radio" ng-model="parseType" ng-change="parseTypeChange()" value="json"> <span class="parse-label">JSON</span>
|
||||
<input type="radio" ng-model="parseType" ng-change="parseTypeChange('parseType', 'extraVars')" value="yaml"><span class="parse-label">YAML</span>
|
||||
<input type="radio" ng-model="parseType" ng-change="parseTypeChange('parseType', 'extraVars')" value="json"> <span class="parse-label">JSON</span>
|
||||
</div>
|
||||
|
||||
</label>
|
||||
|
Loading…
Reference in New Issue
Block a user