You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "bbovenzi (via GitHub)" <gi...@apache.org> on 2024/12/11 22:57:37 UTC
[PR] Update sort and filter defaults [airflow]
bbovenzi opened a new pull request, #44855:
URL: https://github.com/apache/airflow/pull/44855
Make it easier to navigate around the new UI with some better defaults
All dag run and task instance tables to sort by start_date
Dags list to sort by last_run_start_date
Time range selectors to the Past Week
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [newsfragments](https://github.com/apache/airflow/tree/main/newsfragments).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update sort and filter defaults [airflow]
Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on code in PR #44855:
URL: https://github.com/apache/airflow/pull/44855#discussion_r1882510506
##########
airflow/ui/src/pages/Dag/Overview/Overview.tsx:
##########
@@ -29,7 +29,7 @@ import TimeRangeSelector from "src/components/TimeRangeSelector";
import { TrendCountButton } from "src/components/TrendCountButton";
import { stateColor } from "src/utils/stateColor";
-const defaultHour = "12";
+const defaultHour = "168";
Review Comment:
Yeah, this is basically for local development. I think long-term this might become a config option.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update sort and filter defaults [airflow]
Posted by "tirkarthi (via GitHub)" <gi...@apache.org>.
tirkarthi commented on code in PR #44855:
URL: https://github.com/apache/airflow/pull/44855#discussion_r1881487165
##########
airflow/ui/src/pages/Dag/Overview/Overview.tsx:
##########
@@ -29,7 +29,7 @@ import TimeRangeSelector from "src/components/TimeRangeSelector";
import { TrendCountButton } from "src/components/TrendCountButton";
import { stateColor } from "src/utils/stateColor";
-const defaultHour = "12";
+const defaultHour = "168";
Review Comment:
This could be heavy on the database being default when there are lot of entries in the database. IIRC the cluster activity page was also slower on large Airflow instances with higher time interval.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update sort and filter defaults [airflow]
Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi merged PR #44855:
URL: https://github.com/apache/airflow/pull/44855
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update sort and filter defaults [airflow]
Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on code in PR #44855:
URL: https://github.com/apache/airflow/pull/44855#discussion_r1882850510
##########
airflow/ui/src/pages/DagsList/DagsList.tsx:
##########
@@ -254,7 +260,11 @@ export const DagsList = () => {
<DataTable
cardDef={cardDef}
columns={columns}
- data={data.dags}
+ // We need to rename latest_dag_runs so that react-table can handle the sort correctly
+ data={data.dags.map((dag) => ({
+ ...dag,
+ last_run_start_date: dag.latest_dag_runs,
Review Comment:
Updated with an empty field vs overwriting it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Update sort and filter defaults [airflow]
Posted by "jedcunningham (via GitHub)" <gi...@apache.org>.
jedcunningham commented on code in PR #44855:
URL: https://github.com/apache/airflow/pull/44855#discussion_r1881353192
##########
airflow/ui/src/pages/DagsList/DagsList.tsx:
##########
@@ -254,7 +260,11 @@ export const DagsList = () => {
<DataTable
cardDef={cardDef}
columns={columns}
- data={data.dags}
+ // We need to rename latest_dag_runs so that react-table can handle the sort correctly
+ data={data.dags.map((dag) => ({
+ ...dag,
+ last_run_start_date: dag.latest_dag_runs,
Review Comment:
This feels wrong? Isn't `latest_dag_runs` an array?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org