You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by bb...@apache.org on 2022/04/05 21:43:28 UTC
[airflow] branch dag-details-durations updated: Fix linting
This is an automated email from the ASF dual-hosted git repository.
bbovenzi pushed a commit to branch dag-details-durations
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/dag-details-durations by this push:
new d1332e7d02 Fix linting
d1332e7d02 is described below
commit d1332e7d029d258cf3c6f8aaadb53daec6381d04
Author: Brent Bovenzi <br...@gmail.com>
AuthorDate: Tue Apr 5 17:43:10 2022 -0400
Fix linting
---
airflow/www/static/js/tree/details/content/Dag.jsx | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/airflow/www/static/js/tree/details/content/Dag.jsx b/airflow/www/static/js/tree/details/content/Dag.jsx
index 109b140bb4..345e8ddb65 100644
--- a/airflow/www/static/js/tree/details/content/Dag.jsx
+++ b/airflow/www/static/js/tree/details/content/Dag.jsx
@@ -45,7 +45,7 @@ const dagDetailsUrl = getMetaValue('dag_details_url');
const Dag = () => {
const { data: dag } = useDag(dagId);
const { data: taskData } = useTasks(dagId);
- const { data: { groups = {}, dagRuns = [] } } = useTreeData();
+ const { data: { dagRuns = [] } } = useTreeData();
if (!dag || !taskData) return null;
const { tasks = [], totalEntries = '' } = taskData;
const {
@@ -63,13 +63,8 @@ const Dag = () => {
});
const durations = [];
- const runs = dagRuns.map((dagRun) => {
- const duration = getDuration(dagRun.startDate, dagRun.endDate);
- durations.push(duration);
- return {
- ...dagRun,
- duration,
- };
+ dagRuns.forEach((dagRun) => {
+ durations.push(getDuration(dagRun.startDate, dagRun.endDate));
});
// calculate dag run bar heights relative to max