From 680990903809cb76c17266916532e91e2249aa1d Mon Sep 17 00:00:00 2001 From: Nikita Date: Thu, 12 Sep 2024 17:56:02 +0300 Subject: [PATCH] Fix require_confirmation_dag_change (#42063) * Add 'lower' to require_confirmation_dag_change * Set input attribute only if require-confirmation is true (cherry picked from commit 9a1f9e90a5fd8fc1a0736d9d23dccefeb8614f39) --- airflow/www/static/js/dag.js | 2 +- airflow/www/templates/airflow/dag.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/airflow/www/static/js/dag.js b/airflow/www/static/js/dag.js index 38930637396aa..f178ac0a5b024 100644 --- a/airflow/www/static/js/dag.js +++ b/airflow/www/static/js/dag.js @@ -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?` diff --git a/airflow/www/templates/airflow/dag.html b/airflow/www/templates/airflow/dag.html index d3a7995440c05..69151dd09329f 100644 --- a/airflow/www/templates/airflow/dag.html +++ b/airflow/www/templates/airflow/dag.html @@ -129,7 +129,7 @@

{% endif %}