-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Add filtering for tasks view #54484
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
Add filtering for tasks view #54484
Conversation
bbovenzi
left a comment
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.
Cool!
Left a few comments. This was always an awkward page. I think we should also show more Task info on the page. Like the card view doesn't show Retry or Mapped info. Is there anything else you would want to see here? I'd imagine a search by task_id would be very valuable!
pierrejeambrun
left a comment
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.
Nice!
Just a few comments:
We need some margin between the two rows

'reset' filter button doesn't seem to reset the search field
When filling multiple values, it doesn't display well:
https://github.com/user-attachments/assets/b138ad6a-5374-470d-9ee4-da2543488dab
airflow-core/src/airflow/ui/src/pages/Dag/Tasks/TaskFilters.tsx
Outdated
Show resolved
Hide resolved
I don't really know how to fix these things quickly and I need to move on to asset partitioning unfortunately. Fancy adding to this PR? |
|
ok i fixed most of the things the search bar thing ---- basically, it has internal calls to useState, so it cannot be driven exclusively by changes to searchParams if we're always going to use searchParams, probably it should not use its own state store -- seems like if you do that then the only way to clear the search bar is to click the X i also didn't mess with the filter court -- this could be done as followup i suppose i added a justify to improve the horizontal spacing . it's not perfect but it's better. if you have fixes feel free to push em. otherwise maybe we can just merge this and anyone with time can tweak and refine? |
|
alternatively i can just remove the text search -- it was not part of the original ticket |
|
Hi @dstandish in your video I can see this toggle button in the middle in black colour. it looks like you can use it to hide details page on the right. is that correct? |
|
As discussed, don't mind the search bar reset value as this is not related to this PR but to how search bar work, we need to solve it in a follow up. |
Yeah I noticed also with dags list, the reset button does not reset the search filters. Let me know if there's anything further you need me to change in this one. Thanks |
|
hey @bbovenzi @pierrejeambrun if y'all want to take another pass and see if there's anything left to do so we can close this out? |
bbovenzi
left a comment
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.
made some small changes. now it looks good
thanks @bbovenzi |
* Add filtering by operator name * fixup! Add filtering by operator name * get things working and use translate * make it more generic * add reset button and fix some checks * fix pre-commit checks * add multi select * rename multi-select * add trigger rules * don't need filter count * add retry values filters * add mapped * improve display for mapped selection * add prefix * fix logic * use url params for filter state * add translation * extract taskfilters into distinct component * fix import after rebase * add search * make the filter stack responsive * fixes * fixes * add missing file * add justify * Update filters --------- Co-authored-by: Brent Bovenzi <brent.bovenzi@gmail.com>
* Add filtering by operator name * fixup! Add filtering by operator name * get things working and use translate * make it more generic * add reset button and fix some checks * fix pre-commit checks * add multi select * rename multi-select * add trigger rules * don't need filter count * add retry values filters * add mapped * improve display for mapped selection * add prefix * fix logic * use url params for filter state * add translation * extract taskfilters into distinct component * fix import after rebase * add search * make the filter stack responsive * fixes * fixes * add missing file * add justify * Update filters --------- Co-authored-by: Brent Bovenzi <brent.bovenzi@gmail.com>


Closes #53048
Adds some filters in the tasks view.
I elected not to add a new endpoint but just to filter what was there as a good first improvement. I think adding the endpoint introduces meaningful complexity and some questions and ambiguities that would need to be resolved.
I also didn't add the time-based filtering for the same reason. It's not how the current endpoint works, and I think adding time-based filtering would require more refactoring and more thought about the interface.
All other filters in the ticket, however, I have added.
update
I added basic task-name search filter and refactored the filters into a separate component like done with DagsList
tasks.filters.mov