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

[AIRFLOW-3233] Fix deletion of DAGs in the UI #4069

Merged
merged 1 commit into from
Nov 17, 2018
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
6 changes: 3 additions & 3 deletions airflow/www/templates/airflow/dags.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@ <h2>DAGs</h2>
</a>

<!-- Delete -->
<a href="{{ url_for('airflow.delete', dag_id=dag.dag_id) }}"
onclick="return confirmDeleteDag('{{ dag.safe_dag_id }}')">
<!-- Use dag_id instead of dag.dag_id, because the DAG might not exist in the webserver's DagBag -->
Copy link
Member

Choose a reason for hiding this comment

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

Minor nit: this includes the comment in thee HTML which we don't need. If you think the comment is useful then:

Suggested change
<!-- Use dag_id instead of dag.dag_id, because the DAG might not exist in the webserver's DagBag -->
{# Use dag_id instead of dag.dag_id, because the DAG might not exist in the webserver's DagBag #}

<a href="{{ url_for('airflow.delete', dag_id=dag_id) }}"
onclick="return confirmDeleteDag('{{ dag_id }}')">
<span class="glyphicon glyphicon-remove-circle" style="color:red" aria-hidden="true" data-original-title="Delete Dag"></span>
</a>

</td>
</tr>
{% endfor %}
Expand Down
7 changes: 4 additions & 3 deletions airflow/www_rbac/templates/airflow/dags.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,10 @@ <h2>DAGs</h2>
</a>

<!-- Delete -->
<a href="{{ url_for('Airflow.delete', dag_id=dag.dag_id) }}"
onclick="return confirmDeleteDag('{{ dag.safe_dag_id }}')">
<span class="glyphicon glyphicon-remove-circle" style="color:red" aria-hidden="true" data-original-title="Delete Dag"></span>
<!-- Use dag_id instead of dag.dag_id, because the DAG might not exist in the webserver's DagBag -->
<a href="{{ url_for('Airflow.delete', dag_id=dag_id) }}"
onclick="return confirmDeleteDag('{{ dag_id }}')">
<span class="glyphicon glyphicon-remove-circle" style="color:red" aria-hidden="true" data-original-title="Delete Dag"></span>
</a>
</td>
</tr>
Expand Down