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/static/js/dag.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ $("#pause_resume").on("change", function onChange() {
const $input = $(this);
const id = $input.data("dag-id");
const isPaused = $input.is(":checked");
const requireConfirmation = $input.data("require-confirmation");
const requireConfirmation = $input.is("[data-require-confirmation]");
if (requireConfirmation) {
const confirmation = window.confirm(
`Are you sure you want to ${isPaused ? "resume" : "pause"} this DAG?`
Expand Down
2 changes: 1 addition & 1 deletion airflow/www/templates/airflow/dag.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ <h3>
{% endif %}
<label class="switch-label{{' disabled' if not can_edit_dag else '' }} js-tooltip" title="{{ switch_tooltip }}">
<input class="switch-input" id="pause_resume" data-dag-id="{{ dag.dag_id }}"
data-require-confirmation="{{ appbuilder.require_confirmation_dag_change }}"
{{ "data-require-confirmation" if appbuilder.require_confirmation_dag_change else "" }}
type="checkbox"{{ " checked" if not dag_is_paused else "" }}
{{ " disabled" if not can_edit_dag else "" }}>
<span class="switch" aria-hidden="true"></span>
Expand Down