You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2021/09/10 12:54:49 UTC

[airflow] branch v2-1-test updated: Fixes incorrect parameter passed to views (#18083) (#18085)

This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch v2-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v2-1-test by this push:
     new 6c59622  Fixes incorrect parameter passed to views (#18083) (#18085)
6c59622 is described below

commit 6c59622686b6ae0835c69d9902940a051167c1e4
Author: Robin Edwards <ro...@gmail.com>
AuthorDate: Wed Sep 8 23:00:52 2021 +0100

    Fixes incorrect parameter passed to views (#18083) (#18085)
    
    The task_stats, last_dagruns, blocked etc expect dag_ids not dagIds.
    
    This caused the endpoint to return all dags the user had access to by
    default
    
    closes: #18083
    (cherry picked from commit d6e48cd98a1d82829326d4c48a80688866563f3e)
---
 airflow/www/static/js/dags.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/airflow/www/static/js/dags.js b/airflow/www/static/js/dags.js
index 01da376..c08b5b1 100644
--- a/airflow/www/static/js/dags.js
+++ b/airflow/www/static/js/dags.js
@@ -86,7 +86,7 @@ const encodedDagIds = new URLSearchParams();
 $.each($('[id^=toggle]'), function toggleId() {
   const $input = $(this);
   const dagId = $input.data('dag-id');
-  encodedDagIds.append('dagIds', dagId);
+  encodedDagIds.append('dag_ids', dagId);
 
   $input.on('change', () => {
     const isPaused = $input.is(':checked');
@@ -306,7 +306,7 @@ function taskStatsHandler(error, json) {
   });
 }
 
-if (encodedDagIds.has('dagIds')) {
+if (encodedDagIds.has('dag_ids')) {
   // dags on page fetch stats
   d3.json(blockedUrl)
     .header('X-CSRFToken', csrfToken)