You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by bb...@apache.org on 2022/04/20 14:31:39 UTC

[airflow] 08/09: Chain map_index params

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

bbovenzi pushed a commit to branch mapped-instance-actions
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 7fcedbd7c7db48d269bfe8a1ab889e60a292f765
Author: Brent Bovenzi <br...@gmail.com>
AuthorDate: Tue Apr 19 09:57:37 2022 -0400

    Chain map_index params
---
 airflow/www/static/js/tree/api/useClearTask.js       | 9 ++++++---
 airflow/www/static/js/tree/api/useConfirmMarkTask.js | 6 +++++-
 airflow/www/static/js/tree/api/useMarkFailedTask.js  | 9 ++++++---
 airflow/www/static/js/tree/api/useMarkSuccessTask.js | 8 ++++++--
 4 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/airflow/www/static/js/tree/api/useClearTask.js b/airflow/www/static/js/tree/api/useClearTask.js
index eea4b2b656..2ea3eee486 100644
--- a/airflow/www/static/js/tree/api/useClearTask.js
+++ b/airflow/www/static/js/tree/api/useClearTask.js
@@ -51,10 +51,13 @@ export default function useClearTask({
         downstream,
         recursive,
         only_failed: failed,
-        map_indexes: mapIndexes,
-      }).toString();
+      });
+
+      mapIndexes.forEach((mi) => {
+        params.append('map_index', mi);
+      });
 
-      return axios.post(clearUrl, params, {
+      return axios.post(clearUrl, params.toString(), {
         headers: {
           'Content-Type': 'application/x-www-form-urlencoded',
         },
diff --git a/airflow/www/static/js/tree/api/useConfirmMarkTask.js b/airflow/www/static/js/tree/api/useConfirmMarkTask.js
index 85b5f7df42..d1f8eef9d3 100644
--- a/airflow/www/static/js/tree/api/useConfirmMarkTask.js
+++ b/airflow/www/static/js/tree/api/useConfirmMarkTask.js
@@ -40,8 +40,12 @@ export default function useConfirmMarkTask({
         upstream,
         downstream,
         state,
-        map_indexes: mapIndexes,
       });
+
+      mapIndexes.forEach((mi) => {
+        params.append('map_index', mi);
+      });
+
       return axios.get(confirmUrl, { params });
     },
   );
diff --git a/airflow/www/static/js/tree/api/useMarkFailedTask.js b/airflow/www/static/js/tree/api/useMarkFailedTask.js
index 333fed21c2..a94ab22d0c 100644
--- a/airflow/www/static/js/tree/api/useMarkFailedTask.js
+++ b/airflow/www/static/js/tree/api/useMarkFailedTask.js
@@ -45,10 +45,13 @@ export default function useMarkFailedTask({
         future,
         upstream,
         downstream,
-        map_indexes: mapIndexes,
-      }).toString();
+      });
+
+      mapIndexes.forEach((mi) => {
+        params.append('map_index', mi);
+      });
 
-      return axios.post(failedUrl, params, {
+      return axios.post(failedUrl, params.toString(), {
         headers: {
           'Content-Type': 'application/x-www-form-urlencoded',
         },
diff --git a/airflow/www/static/js/tree/api/useMarkSuccessTask.js b/airflow/www/static/js/tree/api/useMarkSuccessTask.js
index cde919a274..47fda2f0f8 100644
--- a/airflow/www/static/js/tree/api/useMarkSuccessTask.js
+++ b/airflow/www/static/js/tree/api/useMarkSuccessTask.js
@@ -46,9 +46,13 @@ export default function useMarkSuccessTask({
         upstream,
         downstream,
         map_indexes: mapIndexes,
-      }).toString();
+      });
+
+      mapIndexes.forEach((mi) => {
+        params.append('map_index', mi);
+      });
 
-      return axios.post(successUrl, params, {
+      return axios.post(successUrl, params.toString(), {
         headers: {
           'Content-Type': 'application/x-www-form-urlencoded',
         },