From 17f87ac80696ff92c5d402b3cd421701df9bbe3c Mon Sep 17 00:00:00 2001 From: Brent Bovenzi Date: Mon, 14 Jun 2021 13:26:39 -0500 Subject: [PATCH] add num_runs query param for tree refresh - add `num_runs` as a meta field to add to the tree refresh request --- airflow/www/static/js/tree.js | 3 ++- airflow/www/templates/airflow/tree.html | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/airflow/www/static/js/tree.js b/airflow/www/static/js/tree.js index 678bec84ca107..e108a21baf1ed 100644 --- a/airflow/www/static/js/tree.js +++ b/airflow/www/static/js/tree.js @@ -28,6 +28,7 @@ import getMetaValue from './meta_value'; // dagId comes from dag.html const dagId = getMetaValue('dag_id'); const treeDataUrl = getMetaValue('tree_data'); +const numRuns = getMetaValue('num_runs'); 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}`) + $.get(`${treeDataUrl}?dag_id=${dagId}&num_runs=${numRuns}`) .done( (runs) => { const newData = { diff --git a/airflow/www/templates/airflow/tree.html b/airflow/www/templates/airflow/tree.html index acc68dd04ef5c..34c4ae73d71f7 100644 --- a/airflow/www/templates/airflow/tree.html +++ b/airflow/www/templates/airflow/tree.html @@ -33,6 +33,11 @@ {% endblock %} +{% block head_meta %} + {{ super() }} + +{% endblock %} + {% block content %} {{ super() }}