Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add num_runs query param for tree refresh #16437

Merged
merged 1 commit into from Jun 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion airflow/www/static/js/tree.js
Expand Up @@ -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);
Expand Down Expand Up @@ -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 = {
Expand Down
5 changes: 5 additions & 0 deletions airflow/www/templates/airflow/tree.html
Expand Up @@ -33,6 +33,11 @@
</style>
{% endblock %}

{% block head_meta %}
{{ super() }}
<meta name="num_runs" content="{{ num_runs }}">
{% endblock %}

{% block content %}
{{ super() }}
<div class="row dag-view-tools">
Expand Down