From a8400e4b7c3775a34e87366fc91000483c6b386d Mon Sep 17 00:00:00 2001 From: nixocio Date: Thu, 12 Nov 2020 10:04:50 -0500 Subject: [PATCH] Add updates related to smart inventories Add updates related to smart inventories. * Add popover for `Smart host filter`. * Add popover for `Instance Groups` on Smart Inventory screen. * Rename `Host filter` to `Smart host filter` per mockup. * Add inventory as part of dynamic host filter. See: https://github.com/ansible/awx/issues/8581 Also: https://github.com/ansible/awx/issues/8548 --- .../components/Lookup/HostFilterLookup.jsx | 20 ++++++++-- .../src/components/Lookup/HostListItem.jsx | 40 +++++++++++++++++++ .../components/Lookup/HostListItem.test.jsx | 25 ++++++++++++ .../Inventory/shared/SmartInventoryForm.jsx | 3 ++ .../shared/SmartInventoryForm.test.jsx | 4 +- 5 files changed, 87 insertions(+), 5 deletions(-) create mode 100644 awx/ui_next/src/components/Lookup/HostListItem.jsx create mode 100644 awx/ui_next/src/components/Lookup/HostListItem.test.jsx diff --git a/awx/ui_next/src/components/Lookup/HostFilterLookup.jsx b/awx/ui_next/src/components/Lookup/HostFilterLookup.jsx index 13a89512ea..862d1b0f1a 100644 --- a/awx/ui_next/src/components/Lookup/HostFilterLookup.jsx +++ b/awx/ui_next/src/components/Lookup/HostFilterLookup.jsx @@ -14,9 +14,11 @@ import { Modal, } from '@patternfly/react-core'; import ChipGroup from '../ChipGroup'; +import Popover from '../Popover'; import DataListToolbar from '../DataListToolbar'; import LookupErrorMessage from './shared/LookupErrorMessage'; -import PaginatedDataList, { PaginatedDataListItem } from '../PaginatedDataList'; +import PaginatedDataList from '../PaginatedDataList'; +import HostListItem from './HostListItem'; import { HostsAPI } from '../../api'; import { getQSConfig, mergeParams, parseQueryString } from '../../util/qs'; import useRequest, { useDismissableError } from '../../util/useRequest'; @@ -246,12 +248,22 @@ function HostFilterLookup({ fieldId="host-filter" helperTextInvalid={helperTextInvalid} isRequired - label={i18n._(t`Host filter`)} + label={i18n._(t`Smart host filter`)} validated={isValid ? 'default' : 'error'} + labelIcon={ + + } >