kata-containers / kata-containers.github.io

CI dashboard for Kata Containers and Confidential Containers
https://kata-containers.github.io/
0 stars 2 forks source link

dashboard: Add search pre-fill via url #4

Open stevenhorsman opened 3 weeks ago

stevenhorsman commented 3 weeks ago

It would be useful, particularly when sending evidence that a test is eligible to becoming required if we could provide an optional url query parameter that would pre-fill the search box. e.g. if I want to give evidence that the run-runk tests are stable/have problems, I could link something like https://kata-containers.github.io/?search=run-runk

and it would pre-fill in the search with that string, and maybe even auto expand the results view? e.g.

image
afinn12 commented 2 weeks ago

URL search working-- example shows URL searching for "qemu" and table search looking for "coco." (PR #15 in our repo)

Image

stevenhorsman commented 2 weeks ago

Thanks - the demo looks great, so I look forward to seeing this get merged :)

sprt commented 2 weeks ago

@afinn12 Can we make it so that typing in the search bar updates the URL directly? Or provide some button to click to go to that search page? I want to avoid users having to manipulate the URL directly.

afinn12 commented 1 week ago

When filters are applied using the menu, the URL is immediately updated and the page is reloaded.

If "Keep URL Search Terms" is selected, the search rules from the URL will be kept in future searches.

For instance, given this search: Image

If we add another rule: Image

It then loads: Image

Note that the operator changed appropriately (matches any vs. all, denoted as "and"/"or") as well. Populating the filter menu with the rules from the URL didn't appear possible. PR #20 in our repo