Skip to content

Commit

Permalink
[AIRFLOW-3569] Add "Trigger DAG" button in DAG page (/www_rbac only) (a…
Browse files Browse the repository at this point in the history
…pache#4373)

To have the Manual Trigger DAG button in the DAG page as well,
rather than only in the home page.
  • Loading branch information
XD-DENG authored and jxiao0 committed Feb 14, 2019
1 parent e9ccc95 commit 175c5dc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions airflow/www_rbac/templates/airflow/dag.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ <h4 class="pull-right">
Code
</a>
</li>
<li>
<a href="{{ url_for('Airflow.trigger', dag_id=dag.dag_id, origin="/tree?dag_id="+dag.dag_id) }}"
onclick="return confirmTriggerDag('{{ dag.safe_dag_id }}')">
<span class="glyphicon glyphicon-play-circle" aria-hidden="true"></span>
Trigger DAG
</a>
</li>
<li>
<a href="{{ url_for('Airflow.refresh', dag_id=dag.dag_id) }}" title="Refresh">
<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>
Expand Down Expand Up @@ -330,6 +337,10 @@ <h4 class="modal-title" id="dagModalLabel">
$("#dagModal").css("margin-top","0px");
}

function confirmTriggerDag(dag_id){
return confirm("Are you sure you want to run '"+dag_id+"' now?");
}

function confirmDeleteDag(dag_id){
return confirm("Are you sure you want to delete '"+dag_id+"' now?\n\
This option will delete ALL metadata, DAG runs, etc.\n\
Expand Down

0 comments on commit 175c5dc

Please sign in to comment.