mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -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:
@@ -257,7 +257,11 @@ angular.module('FormGenerator', ['GeneratorHelpers'])
|
||||
html += "><i class=\"icon-info-sign\"></i></a> ";
|
||||
}
|
||||
html += field.label + '</label>' + "\n";
|
||||
html += "<div class=\"controls\">\n";
|
||||
html += "<div class=\"controls\">\n";
|
||||
if (fld == "variables") {
|
||||
html += "<div class=\"parse-selection\">Parse as: <label class=\"radio inline\"><input type=\"radio\" ng-model=\"parseType\" value=\"json\"> JSON</label>\n";
|
||||
html += "<label class=\"radio inline\"><input type=\"radio\" ng-model=\"parseType\" value=\"yaml\"> YAML</label></div>\n";
|
||||
}
|
||||
html += "<textarea ";
|
||||
html += (field.rows) ? this.attr(field, 'rows') : "";
|
||||
html += "ng-model=\"" + fld + '" ';
|
||||
|
||||
6
ansibleworks/ui/static/lib/js-yaml/js-yaml.min.js
vendored
Normal file
6
ansibleworks/ui/static/lib/js-yaml/js-yaml.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user