mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Merge pull request #10606 from nixocio/ui_issue_10595
Display full keys advanced search smart inventory Display full keys advanced search smart inventory closes: #10595 Reviewed-by: Alex Corey <Alex.swansboro@gmail.com> Reviewed-by: Sarah Akus <sakus@redhat.com>
This commit is contained in:
commit
d01cd5517d
@ -129,6 +129,13 @@ function HostFilterLookup({
|
||||
const { isModalOpen, toggleModal, closeModal } = useModal();
|
||||
const searchColumns = buildSearchColumns();
|
||||
|
||||
const parseRelatedSearchFields = searchFields => {
|
||||
if (searchFields.indexOf('__search') !== -1) {
|
||||
return searchFields.slice(0, -8);
|
||||
}
|
||||
return searchFields;
|
||||
};
|
||||
|
||||
const {
|
||||
result: { count, hosts, relatedSearchableKeys, searchableKeys },
|
||||
error: contentError,
|
||||
@ -147,9 +154,9 @@ function HostFilterLookup({
|
||||
return {
|
||||
count: data.count,
|
||||
hosts: data.results,
|
||||
relatedSearchableKeys: (
|
||||
actions?.related_search_fields || []
|
||||
).map(val => val.slice(0, -8)),
|
||||
relatedSearchableKeys: (actions?.related_search_fields || []).map(
|
||||
parseRelatedSearchFields
|
||||
),
|
||||
searchableKeys: Object.keys(actions?.actions.GET || {}).filter(
|
||||
key => actions.actions?.GET[key].filterable
|
||||
),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user