-
-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow filtering by label #1568
base: main
Are you sure you want to change the base?
Allow filtering by label #1568
Conversation
…rk88/good_job into expose-good-job-labels-in-dashboard
const selectedValues = Array.from(labelFilter.selectedOptions).map(option => option.value); | ||
const allLabelsOption = labelFilter.querySelector('option[value="_all"]'); | ||
|
||
if (selectedValues.includes('_all')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's probably a better way to do this; I don't write a lot of javascript
filtered_query(params.slice(:queue_name)) | ||
.joins("CROSS JOIN unnest(labels) AS label") | ||
.group("label") | ||
.order("label") | ||
.count | ||
.to_h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you mentioned, this probably needs to be moved into something that can be done asynchronously
Adds a means of selecting labels in the GoodJob Dashboard