1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 01:21:21 +03:00

Merge pull request #383 from jaredevantabor/inventory-scripts-lookup

Changing 'source_script' to 'inventory_script' on groups modal.
This commit is contained in:
jaredevantabor 2015-08-20 11:31:10 -07:00
commit c5abc791d3
2 changed files with 10 additions and 9 deletions

View File

@ -108,14 +108,14 @@ export default
"</ul><p>If blank, all groups above are created except <em>Instance ID</em>.</p>",
dataContainer: 'body'
},
source_script: {
inventory_script: {
label : "Custom Inventory Script",
labelClass: 'prepend-asterisk',
type: 'lookup',
ngShow: "source && source.value === 'custom'",
sourceModel: 'source_script',
sourceModel: 'inventory_script',
sourceField: 'name',
ngClick: 'lookUpSource_script()' ,
ngClick: 'lookUpInventory_script()' ,
addRequired: false,
editRequired: false,
ngRequired: "source && source.value === 'custom'",

View File

@ -290,7 +290,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
form: form,
hdr: "Select Custom Inventory",
list: inventoryScriptsListObject,
field: 'source_script',
field: 'inventory_script',
input_type: 'radio'
});
scope.extra_vars = (Empty(scope.source_vars)) ? "---" : scope.source_vars;
@ -1027,9 +1027,10 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
sources_scope.source_vars = ParseVariableString(data.source_vars);
master.source_vars = sources_scope.variables;
}
// else if(fld === "source_script"){
// sources_scope[fld] = data
// }
else if(fld === "inventory_script"){
// the API stores it as 'source_script', we call it inventory_script
data.summary_fields['inventory_script'] = data.summary_fields.source_script;
}
else if (data[fld] !== undefined) {
sources_scope[fld] = data[fld];
@ -1275,7 +1276,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
credential: sources_scope.credential,
overwrite: sources_scope.overwrite,
overwrite_vars: sources_scope.overwrite_vars,
source_script: sources_scope.source_script,
source_script: sources_scope.inventory_script,
update_on_launch: sources_scope.update_on_launch,
update_cache_timeout: (sources_scope.update_cache_timeout || 0)
};