Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion airflow/www/templates/airflow/graph.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<span class="loading-dot"></span>
</span>
<label class="switch-label">
<input class="switch-input" id="auto_refresh" type="checkbox" checked>
<input class="switch-input" id="auto_refresh" type="checkbox" {% if dag_run_state == 'running' %}checked{% endif %}>
<span class="switch" aria-hidden="true"></span>
Auto-refresh
</label>
Expand Down
3 changes: 2 additions & 1 deletion airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1842,7 +1842,8 @@ class GraphForm(DateTimeWithNumRunsWithDagRunsForm):
nodes=nodes,
edges=edges,
show_external_log_redirect=task_log_reader.supports_external_link,
external_log_name=external_log_name)
external_log_name=external_log_name,

@kaxil kaxil Oct 15, 2020

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was mostly thinking of the current DagRun i.e. if this DagRun isn't running we don't refresh as with the current change, if another DagRun is running, this will still refresh automatically

You can get the state of it already using dt_nr_dr_data['dr_state'] (also used on L1839)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks @kaxil!

dag_run_state=dt_nr_dr_data['dr_state'])

@expose('/duration')
@has_dag_access(can_dag_read=True)
Expand Down