Awx: [ui-next] Smart host filtering search issues

Created on 20 Aug 2020  路  4Comments  路  Source: ansible/awx

ISSUE TYPE
  • Bug Report
SUMMARY

Implementation of advanced search filtering appears to have slightly messed with some basic searches. It is worth exploring other parts of search (modals, specifically) to see if this is a systemic issue or not.

STEPS TO REPRODUCE
  1. Inventories > Create new Smart Inventory
  2. Fill in the name and use the Default organization. For my example, I just used localhost as my host.
  3. Click Host filter. In my example, only one host is available, localhost.
    Screenshot from 2020-08-20 12-00-48

It is unusual that the filter says Name (name) instead of just Name.

Deleting the filter persists the Clear all filters button for some reason.
Screenshot from 2020-08-20 12-00-57

Also, searching the beginning of the string with just lo (the first two characters) does not work, even though it should.

Screenshot from 2020-08-20 12-01-05

The issues here are:

  • [ ] Identify why the filter says Name (name) instead of Name
  • [ ] Identify why searching the beginning of the name doesn't work (only does exact match)
  • [ ] update 8/25 when doing an advanced search the host filter does not appear to be saved correctly and show up in the host filter info despite being set:
    Screenshot from 2020-08-25 09-49-45
    It is not visible in this screenshot, but on save, the filter appears in the details view.
high in_progress bug

All 4 comments

@keithjgrant just a FYI, that Clear all filters bug is here: https://github.com/ansible/awx/issues/7830

also: a _while you're in there_ bug https://github.com/ansible/awx/issues/6801

I think this is specifically an issue with the Smart Host lookup, since that lookup is a special case and doesn't use the same sub-component we use for other lookups.

Related PR: https://github.com/ansible/awx/pull/7644

This is not a systemic lookup issue. The smart host filter is a one-off lookup because it behaves very differently from our generic lookup. The generic lookup search component filters a list of items that a user could select from. The smart host lookup filters AND selects the list of hosts by turning the search query into a "host filter string".

The smart host filter lookup:

  • Does not show a "Selected List", because the list is the selected list
  • The input group value is a "host filter string" instead of a list of items displayed as chips
  • It queries for hosts using a special key host_filter. The filter supports: relational queries, and or boolean logic, as well as expression grouping via (). Host filters saved on the modal must correspond to the same result
    as when that host_filter is used in the URL as a querystring.

PR already merged stubs in:

smart-inventory-crud.spec.js
smart-inventory-operations.spec.js
smart-inventory-tabs.spec.js
Was this page helpful?
0 / 5 - 0 ratings