Skip to content

Commit

Permalink
Fix Extra Links in Gannt View
Browse files Browse the repository at this point in the history
Extra link didn't appear after changes in  #8220 for Gantt View
  • Loading branch information
kaxil committed Apr 14, 2020
1 parent 54d3c9a commit 9a25965
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1961,7 +1961,10 @@ def gantt(self, session=None):
# https://issues.apache.org/jira/browse/AIRFLOW-2143
try_count = ti.prev_attempted_tries
gantt_bar_items.append((ti.task_id, ti.start_date, end_date, ti.state, try_count))
tasks.append(alchemy_to_dict(ti))
gantt_bar_items.append((ti.task_id, ti.start_date, end_date, ti.state, try_count))
d = alchemy_to_dict(ti)
d['extraLinks'] = dag.get_task(ti.task_id).extra_links
tasks.append(d)

tf_count = 0
try_count = 1
Expand All @@ -1976,10 +1979,12 @@ def gantt(self, session=None):
prev_task_id = tf.task_id
gantt_bar_items.append((tf.task_id, start_date, end_date, State.FAILED, try_count))
tf_count = tf_count + 1
task = dag.get_task(tf.task_id)
d = alchemy_to_dict(tf)
d['state'] = State.FAILED
d['operator'] = dag.get_task(tf.task_id).task_type
d['operator'] = task.task_type
d['try_number'] = try_count
d['extraLinks'] = task.extra_links
tasks.append(d)

data = {
Expand Down

0 comments on commit 9a25965

Please sign in to comment.