mirror of
https://github.com/ansible/awx.git
synced 2026-04-07 02:59:21 -02:30
Added YAML support to Host and Group variable data. User can enter variables in either format, UI will parse it and send to API as JSON. Fixed post to /hosts/N/variable_data and /groups/N/variable_data so that JSON is sent as an object rather than a string.
This commit is contained in:
@@ -34,14 +34,13 @@ angular.module('GroupFormDefinition', [])
|
||||
addRequired: false,
|
||||
editRequird: false,
|
||||
rows: 10,
|
||||
"class": 'modal-input-xlarge',
|
||||
"default": "\{\}",
|
||||
dataTitle: 'Group Variables',
|
||||
dataPlacement: 'right',
|
||||
awPopOver: '<p>Enter variables as JSON. Both the key and value must be wrapped in double quotes. ' +
|
||||
'Separate variables with commas, and wrap the entire string with { }. ' +
|
||||
' For example:</p><p>{<br\>"ntp_server": "ntp.example.com",<br \>' +
|
||||
'"proxy": "proxy.example.com"<br \>}</p><p>See additional JSON examples at <a href="' +
|
||||
'http://www.json.org" target="_blank">www.json.org</a></p>'
|
||||
awPopOver: "<p>Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.</p>" +
|
||||
'<p>View JSON examples at <a href="http://www.json.org" target="_blank">www.json.org</a></p>' +
|
||||
'<p>View YAML examples at <a href="http://www.ansibleworks.com/docs/YAMLSyntax.html" target="_blank">ansiblewors.com</a></p>'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -39,12 +39,11 @@ angular.module('HostFormDefinition', [])
|
||||
addRequired: false,
|
||||
editRequird: false,
|
||||
rows: 10,
|
||||
"class": "modal-input-xlarge",
|
||||
"default": "\{\}",
|
||||
awPopOver: "<p>Enter variables as JSON. Both the key and value must be wrapped in double quotes. " +
|
||||
"Separate variables with commas, and wrap the entire string with { }. " +
|
||||
" For example:</p><p>{<br\>"ntp_server": "ntp.example.com",<br \>" +
|
||||
'"proxy": "proxy.example.com"<br \>}</p><p>See additional JSON examples at <a href="' +
|
||||
'http://www.json.org" target="_blank">www.json.org</a></p>',
|
||||
awPopOver: "<p>Enter variables using either JSON or YAML syntax. Use the radio button to toggle between the two.</p>" +
|
||||
'<p>View JSON examples at <a href="http://www.json.org" target="_blank">www.json.org</a></p>' +
|
||||
'<p>View YAML examples at <a href="http://www.ansibleworks.com/docs/YAMLSyntax.html" target="_blank">ansiblewors.com</a></p>',
|
||||
dataTitle: 'Host Variables',
|
||||
dataPlacement: 'right'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user