ara
ara copied to clipboard
ui: ability to search by host or task name
Ability to search for host or task name instead of id (fixes #243)
Furthermore this PR introduces host and task name filters on the playbook index as well
While the taskfilter supports pattern search (icontains
), the host filter expects case insensitve exact expression (iexact
). Because imo that's how most will use it.
Build failed.
:heavy_check_mark: ara-tox-py3 SUCCESS in 4m 06s :heavy_check_mark: ara-tox-linters SUCCESS in 4m 01s :heavy_check_mark: ara-basic-ansible-core-devel SUCCESS in 5m 19s (non-voting) :heavy_check_mark: ara-basic-ansible-6 SUCCESS in 5m 31s :heavy_check_mark: ara-basic-ansible-core-2.13 SUCCESS in 5m 22s :heavy_check_mark: ara-basic-ansible-core-2.12 SUCCESS in 5m 59s :heavy_check_mark: ara-basic-ansible-core-2.11 SUCCESS in 6m 55s :heavy_check_mark: ara-basic-ansible-2.9 SUCCESS in 5m 23s :x: ara-container-images FAILURE in 5m 09s
recheck
Build succeeded.
:heavy_check_mark: ara-tox-py3 SUCCESS in 3m 40s :heavy_check_mark: ara-tox-linters SUCCESS in 4m 29s :heavy_check_mark: ara-basic-ansible-core-devel SUCCESS in 4m 45s (non-voting) :heavy_check_mark: ara-basic-ansible-6 SUCCESS in 4m 49s :heavy_check_mark: ara-basic-ansible-core-2.13 SUCCESS in 6m 04s :heavy_check_mark: ara-basic-ansible-core-2.12 SUCCESS in 4m 53s :heavy_check_mark: ara-basic-ansible-core-2.11 SUCCESS in 6m 08s :heavy_check_mark: ara-basic-ansible-2.9 SUCCESS in 5m 09s :heavy_check_mark: ara-container-images SUCCESS in 11m 07s
@hille721 I finally got around to testing this and it works great, I'm happy that it turned out to be simple after all \o/
This is almost good to merge, two things:
- We should be able to search by task name under the hosts' task results too, here: https://github.com/ansible-community/ara/blob/e3521963bf56c349422d7ef9c5fd8f2018867489/ara/ui/templates/partials/host_results.html#L58-L61
- Although it works, I don't believe the host and task name search fields belong on the playbook index search box (I had commented about this in the issue). We should be fine with the hosts and tasks page for searching about them.
If you see in this gif, I click on the report link to filter the results by task (id) in the playbook report page: https://github.com/ansible-community/ara/pull/342#issuecomment-1242797898
I guess we need to keep the ability to filter by ID because we do the same thing from the hosts page ?
Although it works, I don't believe the host and task name search fields belong on the playbook index search box (I had commented about this in the issue). We should be fine with the hosts and tasks page for searching about them.
Yeah you probably right. With the tasks / hosts page this is not really needed.
If you see in this gif, I click on the report link to filter the results by task (id) in the playbook report page: #342 (comment) I guess we need to keep the ability to filter by ID because we do the same thing from the hosts page ?
I would say no, we can filter for the task id in the playbook report via query parameter but showing the human friendly name in the filter box. Will check that tomorrow.
Build succeeded.
:heavy_check_mark: ara-tox-py3 SUCCESS in 3m 21s :heavy_check_mark: ara-tox-linters SUCCESS in 3m 42s :heavy_check_mark: ara-basic-ansible-core-devel SUCCESS in 5m 30s (non-voting) :heavy_check_mark: ara-basic-ansible-6 SUCCESS in 6m 05s :heavy_check_mark: ara-basic-ansible-core-2.13 SUCCESS in 5m 31s :heavy_check_mark: ara-basic-ansible-core-2.12 SUCCESS in 5m 19s :heavy_check_mark: ara-basic-ansible-core-2.11 SUCCESS in 5m 32s :heavy_check_mark: ara-basic-ansible-2.9 SUCCESS in 6m 14s :heavy_check_mark: ara-container-images SUCCESS in 12m 04s
changes made as requested by @dmsimard :
- search by task name under the hosts' task results too & updated the "task link"
- removed host and task name filters out of playbook section
It works well on my end and it's more straightforward for humans too.
Thanks for for contribution @hille721 :)