mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 20:00:43 -03:30
Display full keys advanced search smart inventory
Display full keys advanced search smart inventory closes: https://github.com/ansible/awx/issues/10595
This commit is contained in:
parent
bc8e19b51d
commit
9295496949
@ -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