diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/sources/add/sources-add.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/sources/add/sources-add.controller.js index 248ecbff60..a08a9e4eb4 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/sources/add/sources-add.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/sources/add/sources-add.controller.js @@ -198,7 +198,10 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition', $scope.group_by = $scope.group_by_choices; $scope.groupByPopOver = i18n._("Specify which groups to create automatically. Group names will be created similar to the options selected. If blank, all groups above are created. Refer to Ansible Tower documentation for more detail."); $scope.instanceFilterPopOver = i18n._("Provide a comma-separated list of filter expressions. Hosts are imported when all of the filters match. Refer to Ansible Tower documentation for more detail."); - } + } + if( _.get($scope, 'source') === 'tower' || _.get($scope.source, 'value') === 'tower') { + $scope.instanceFilterPopOver = i18n._("Provide the name or id of the remote Tower inventory to be imported."); + } CreateSelect2({ element: '#inventory_source_group_by', multiple: true, diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/sources/edit/sources-edit.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/sources/edit/sources-edit.controller.js index 4728e2747a..4b7b9c47aa 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/sources/edit/sources-edit.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/sources/edit/sources-edit.controller.js @@ -275,7 +275,7 @@ export default ['$state', '$stateParams', '$scope', 'ParseVariableString', i18n._("for a complete list of supported filters.") + "

"; } - if( _.get($scope, 'source') === 'vmware' || _.get($scope.source, 'value') === 'vmware') { + if( _.get($scope, 'source') === 'vmware' || _.get($scope.source, 'value') === 'vmware') { add_new = true; $scope.group_by_choices = (inventorySourceData.group_by) ? inventorySourceData.group_by.split(',') .map((i) => ({name: i, label: i, value: i})) : []; @@ -283,6 +283,9 @@ export default ['$state', '$stateParams', '$scope', 'ParseVariableString', $scope.groupByPopOver = i18n._(`Specify which groups to create automatically. Group names will be created similar to the options selected. If blank, all groups above are created. Refer to Ansible Tower documentation for more detail.`); $scope.instanceFilterPopOver = i18n._(`Provide a comma-separated list of filter expressions. Hosts are imported when all of the filters match. Refer to Ansible Tower documentation for more detail.`); } + if( _.get($scope, 'source') === 'tower' || _.get($scope.source, 'value') === 'tower') { + $scope.instanceFilterPopOver = i18n._(`Provide the name or id of the remote Tower inventory to be imported.`); + } CreateSelect2({ element: '#inventory_source_group_by', multiple: true, diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/sources/sources.form.js b/awx/ui/client/src/inventories-hosts/inventories/related/sources/sources.form.js index 38a786d482..d7d6e31c2b 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/sources/sources.form.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/sources/sources.form.js @@ -144,7 +144,7 @@ return { instance_filters: { label: i18n._("Instance Filters"), type: 'text', - ngShow: "source && (source.value == 'ec2' || source.value == 'vmware')", + ngShow: "source && (source.value == 'ec2' || source.value == 'vmware' || source.value == 'tower')", dataTitle: i18n._('Instance Filters'), dataPlacement: 'right', awPopOverWatch: 'instanceFilterPopOver',