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
commit 34fbe0ddebefa35cd46498c21cdeb1377334f68a Author: Brent Bovenzi <[email protected]> AuthorDate: Mon Aug 16 18:00:02 2021 +0200 Add root to tree refresh url (#17633) We were not passing the root to the `/tree_data` api call. Therefore, filtering upstream of a task would be reset during auto-refresh even though root was still defined. (cherry picked from commit c645d7ac2d367fd5324660c616618e76e6b84729) --- airflow/www/static/js/tree.js | 3 ++- airflow/www/templates/airflow/tree.html | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/airflow/www/static/js/tree.js b/airflow/www/static/js/tree.js index d45c880..b0abaca 100644 --- a/airflow/www/static/js/tree.js +++ b/airflow/www/static/js/tree.js @@ -29,6 +29,7 @@ import getMetaValue from './meta_value'; const dagId = getMetaValue('dag_id'); const treeDataUrl = getMetaValue('tree_data'); const numRuns = getMetaValue('num_runs'); +const urlRoot = getMetaValue('root'); function toDateString(ts) { const dt = new Date(ts * 1000); @@ -418,7 +419,7 @@ document.addEventListener('DOMContentLoaded', () => { function handleRefresh() { $('#loading-dots').css('display', 'inline-block'); - $.get(`${treeDataUrl}?dag_id=${dagId}&num_runs=${numRuns}`) + $.get(`${treeDataUrl}?dag_id=${dagId}&num_runs=${numRuns}&root=${urlRoot}`) .done( (runs) => { const newData = { diff --git a/airflow/www/templates/airflow/tree.html b/airflow/www/templates/airflow/tree.html index 34c4ae7..53254b2 100644 --- a/airflow/www/templates/airflow/tree.html +++ b/airflow/www/templates/airflow/tree.html @@ -36,6 +36,7 @@ {% block head_meta %} {{ super() }} <meta name="num_runs" content="{{ num_runs }}"> + <meta name="root" content="{{ root if root else '' }}"> {% endblock %} {% block content %}
