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 cae2962fb6c7dc76be90f626718b01ad3243e6e3 Author: Brent Bovenzi <[email protected]> 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', },
