Skip to content

Commit

Permalink
Merge branch '1478'
Browse files Browse the repository at this point in the history
  • Loading branch information
r39132 committed May 17, 2016
2 parents abc43c1 + 7a1fa7b commit 4d85783
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions airflow/www/templates/airflow/dag.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ <h4 class="modal-title" id="myModalLabel">
>
Downstream
</button>
<button id="btn_recursive"
type="button" class="btn active" data-toggle="button">
Recursive
</button>
</span>
<hr/>
<button id="btn_success" type="button" class="btn btn-primary">
Expand Down Expand Up @@ -284,6 +288,7 @@ <h4 class="modal-title" id="myModalLabel">
"&past=" + $('#btn_past').hasClass('active') +
"&upstream=" + $('#btn_upstream').hasClass('active') +
"&downstream=" + $('#btn_downstream').hasClass('active') +
"&recursive=" + $('#btn_recursive').hasClass('active') +
"&execution_date=" + execution_date +
"&origin=" + encodeURIComponent(window.location);
window.location = url;
Expand Down
5 changes: 4 additions & 1 deletion airflow/www/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,7 @@ def clear(self):
downstream = request.args.get('downstream') == "true"
future = request.args.get('future') == "true"
past = request.args.get('past') == "true"
recursive = request.args.get('recursive') == "true"

dag = dag.sub_dag(
task_regex=r"^{0}$".format(task_id),
Expand All @@ -1025,14 +1026,16 @@ def clear(self):
if confirmed:
count = dag.clear(
start_date=start_date,
end_date=end_date)
end_date=end_date,
include_subdags=recursive)

flash("{0} task instances have been cleared".format(count))
return redirect(origin)
else:
tis = dag.clear(
start_date=start_date,
end_date=end_date,
include_subdags=recursive,
dry_run=True)
if not tis:
flash("No task instances to clear", 'error')
Expand Down

0 comments on commit 4d85783

Please sign in to comment.