From e58e5931403c05f8c2315e36dea5952b415ebf1d Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Wed, 19 Apr 2017 16:59:54 -0400 Subject: [PATCH] First pass implementation of fact searching on hosts --- .../client/src/inventories/hosts/host.list.js | 4 ++++ .../list-generator/list-generator.factory.js | 4 ++++ .../shared/smart-search/queryset.service.js | 20 +++++++++++++++++-- .../smart-search/smart-search.controller.js | 16 ++++++++------- .../smart-search/smart-search.directive.js | 4 +++- 5 files changed, 38 insertions(+), 10 deletions(-) diff --git a/awx/ui/client/src/inventories/hosts/host.list.js b/awx/ui/client/src/inventories/hosts/host.list.js index 34d5056d42..8118431df5 100644 --- a/awx/ui/client/src/inventories/hosts/host.list.js +++ b/awx/ui/client/src/inventories/hosts/host.list.js @@ -10,6 +10,10 @@ export default ['i18n', function(i18n) { iterator: 'host', editTitle: '{{ selected_group }}', searchSize: 'col-lg-12 col-md-12 col-sm-12 col-xs-12', + nonstandardSearchParam: { + root: 'ansible_facts', + param: 'host_filter' + }, showTitle: false, well: true, index: false, diff --git a/awx/ui/client/src/shared/list-generator/list-generator.factory.js b/awx/ui/client/src/shared/list-generator/list-generator.factory.js index 78eb66f5b7..dea1d2383c 100644 --- a/awx/ui/client/src/shared/list-generator/list-generator.factory.js +++ b/awx/ui/client/src/shared/list-generator/list-generator.factory.js @@ -198,11 +198,15 @@ export default ['$compile', 'Attr', 'Icon', list.searchSize = 'col-lg-7 col-md-12 col-sm-12 col-xs-12'; } if (options.showSearch === undefined || options.showSearch === true) { + let nonstandardSearchParam = list.nonstandardSearchParam && list.nonstandardSearchParam.param ? list.nonstandardSearchParam.param : undefined; + let nonstandardSearchParamRoot = list.nonstandardSearchParam && list.nonstandardSearchParam.root ? list.nonstandardSearchParam.root : undefined; html += `