mirror of
https://github.com/ansible/awx.git
synced 2026-03-15 16:07:30 -02:30
Merge pull request #383 from jaredevantabor/inventory-scripts-lookup
Changing 'source_script' to 'inventory_script' on groups modal.
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* All Rights Reserved
|
* All Rights Reserved
|
||||||
*************************************************/
|
*************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ngdoc function
|
* @ngdoc function
|
||||||
* @name forms.function:Source
|
* @name forms.function:Source
|
||||||
@@ -108,14 +108,14 @@ export default
|
|||||||
"</ul><p>If blank, all groups above are created except <em>Instance ID</em>.</p>",
|
"</ul><p>If blank, all groups above are created except <em>Instance ID</em>.</p>",
|
||||||
dataContainer: 'body'
|
dataContainer: 'body'
|
||||||
},
|
},
|
||||||
source_script: {
|
inventory_script: {
|
||||||
label : "Custom Inventory Script",
|
label : "Custom Inventory Script",
|
||||||
labelClass: 'prepend-asterisk',
|
labelClass: 'prepend-asterisk',
|
||||||
type: 'lookup',
|
type: 'lookup',
|
||||||
ngShow: "source && source.value === 'custom'",
|
ngShow: "source && source.value === 'custom'",
|
||||||
sourceModel: 'source_script',
|
sourceModel: 'inventory_script',
|
||||||
sourceField: 'name',
|
sourceField: 'name',
|
||||||
ngClick: 'lookUpSource_script()' ,
|
ngClick: 'lookUpInventory_script()' ,
|
||||||
addRequired: false,
|
addRequired: false,
|
||||||
editRequired: false,
|
editRequired: false,
|
||||||
ngRequired: "source && source.value === 'custom'",
|
ngRequired: "source && source.value === 'custom'",
|
||||||
|
|||||||
@@ -290,7 +290,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
|||||||
form: form,
|
form: form,
|
||||||
hdr: "Select Custom Inventory",
|
hdr: "Select Custom Inventory",
|
||||||
list: inventoryScriptsListObject,
|
list: inventoryScriptsListObject,
|
||||||
field: 'source_script',
|
field: 'inventory_script',
|
||||||
input_type: 'radio'
|
input_type: 'radio'
|
||||||
});
|
});
|
||||||
scope.extra_vars = (Empty(scope.source_vars)) ? "---" : scope.source_vars;
|
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);
|
sources_scope.source_vars = ParseVariableString(data.source_vars);
|
||||||
master.source_vars = sources_scope.variables;
|
master.source_vars = sources_scope.variables;
|
||||||
}
|
}
|
||||||
// else if(fld === "source_script"){
|
else if(fld === "inventory_script"){
|
||||||
// sources_scope[fld] = data
|
// 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) {
|
else if (data[fld] !== undefined) {
|
||||||
sources_scope[fld] = data[fld];
|
sources_scope[fld] = data[fld];
|
||||||
@@ -1275,7 +1276,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
|||||||
credential: sources_scope.credential,
|
credential: sources_scope.credential,
|
||||||
overwrite: sources_scope.overwrite,
|
overwrite: sources_scope.overwrite,
|
||||||
overwrite_vars: sources_scope.overwrite_vars,
|
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_on_launch: sources_scope.update_on_launch,
|
||||||
update_cache_timeout: (sources_scope.update_cache_timeout || 0)
|
update_cache_timeout: (sources_scope.update_cache_timeout || 0)
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user