dashboard: Add search box and link to URL#22
Open
afinn12 wants to merge 4 commits into
Open
Conversation
a1icja
suggested changes
Nov 6, 2024
Contributor
a1icja
left a comment
There was a problem hiding this comment.
Minor changes again - Sorry D:
Comment on lines
+47
to
+87
| // Filters the jobs s.t. all values must be contained in the name. | ||
| const matchAll = (filteredJobs, urlParams) => { | ||
| const values = urlParams.getAll("value"); | ||
| return filteredJobs.filter((job) => { | ||
| const jobName = job.name.toLowerCase(); | ||
| return values.every((val) => { | ||
| const decodedValue = decodeURIComponent(val).toLowerCase(); | ||
| return jobName.includes(decodedValue); | ||
| }); | ||
| }); | ||
| }; | ||
|
|
||
| // Filters the jobs s.t. at least one value must be contained in the name. | ||
| const matchAny = (filteredJobs, urlParams) => { | ||
| const values = urlParams.getAll("value"); | ||
| return filteredJobs.filter((job) => { | ||
| const jobName = job.name.toLowerCase(); | ||
| return values.some((val) => { | ||
| const decodedValue = decodeURIComponent(val).toLowerCase(); | ||
| return jobName.includes(decodedValue); | ||
| }); | ||
| }); | ||
| }; | ||
|
|
||
|
|
Contributor
There was a problem hiding this comment.
Is there not already an existing implementation for this somewhere? Just curious
Contributor
Author
There was a problem hiding this comment.
How do you mean? Besides .some/.every?
We could pull the values out of the URL before passing them into the function. Then, it's just a filter. A little simpler maybe?
6 tasks
fe876d0 to
bcb9abc
Compare
0d7a6c6 to
cee8258
Compare
Added a script that fetches PR data and created a separate view on the dashboard. Tweaked dotenv require. Fixes kata-containers#1 Signed-off-by: Anna Finn <afinn12@bu.edu>
Added code to get rerun information to both fetch scripts. Display the reruns as a superscript in the rowExpansionTemplate with the result/URL. Fixes: kata-containers#8 Signed-off-by: Anna Finn <afinn12@bu.edu>
Added a separate view to display all tests for a given PR. Added the display to the URL, rowExpansionTemplate is unchanged. Fixes: kata-containers#12 Signed-off-by: Anna Finn <afinn12@bu.edu>
Adds an input form for searching job names. Searches are appended to the URL. Fixes kata-containers#4 Signed-off-by: Anna Finn <afinn12@bu.edu>
Contributor
Author
Changes
To reimplement, define clearSearch: Modify handleSearch: Add buttons to use: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Needed
Description
Possible Feature
Testing
in prod:
Default:

Searching with the form appends to URL:

Adding another search with "Keep Search Terms" appends to the URL:

(will update matchMode (and/or) if it changes)
Adding another search without "Keep Search Terms" appends to the URL:

Selecting "Clear Search":
