Skip to content
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

Make duration on "List Dag Run" sortable #28556

Open
1 of 2 tasks
alejandrofm opened this issue Dec 23, 2022 · 2 comments
Open
1 of 2 tasks

Make duration on "List Dag Run" sortable #28556

alejandrofm opened this issue Dec 23, 2022 · 2 comments
Labels
area:UI Related to UI/UX. For Frontend Developers. good first issue kind:feature Feature Requests

Comments

@alejandrofm
Copy link

Description

Currently, all elements of that view are sortable, it would be nice to have the ability to sort it.
Location: dagrun/list/

Use case/motivation

An easy solution to have a quick view of the longest/shortest duration task for a particular filter.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@alejandrofm alejandrofm added the kind:feature Feature Requests label Dec 23, 2022
@alejandrofm
Copy link
Author

I would try to submit a PR if you guide me a little.

@uranusjr uranusjr added the area:UI Related to UI/UX. For Frontend Developers. label Dec 27, 2022
@pierrejeambrun
Copy link
Member

Hello @alejandrofm,

Just assigned you :)

You can start looking at the file airflow/www/views.py, the class DagRunModelView.

Duration is not a db column, so it cannot be treated in the same way as other columns.

One way to achieve this would be to add a column_property/hybrid_property (preferably hybrid) to the model so it is reconstructed at query time. Then from the application point of view, it would just behave like any other columns.

Maybe others will have a better way of achieving this.

Note: For task instance we also persist to the db the duration. (on top of start_date and end_date not sure why, it seems a bit redundant, but we could do something similar as well)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:UI Related to UI/UX. For Frontend Developers. good first issue kind:feature Feature Requests
Projects
None yet
Development

No branches or pull requests

4 participants