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

fix auto-refresh in tree view when webserver ui is not in / #16018

Merged
merged 1 commit into from May 24, 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 @@ -27,6 +27,7 @@ import getMetaValue from './meta_value';

// dagId comes from dag.html
const dagId = getMetaValue('dag_id');
const treeDataUrl = getMetaValue('tree_data');

function toDateString(ts) {
const dt = new Date(ts * 1000);
Expand Down Expand Up @@ -409,7 +410,7 @@ document.addEventListener('DOMContentLoaded', () => {

function handleRefresh() {
$('#loading-dots').css('display', 'inline-block');
$.get(`/object/tree_data?dag_id=${dagId}`)
$.get(`${treeDataUrl}?dag_id=${dagId}`)
.done(
(runs) => {
const newData = {
Expand Down
1 change: 1 addition & 0 deletions airflow/www/templates/airflow/dag.html
Expand Up @@ -35,6 +35,7 @@
<meta name="external_log_url" content="{{ url_for('Airflow.redirect_to_external_log') }}">
<meta name="extra_links_url" content="{{ url_for('Airflow.extra_links') }}">
<meta name="paused_url" content="{{ url_for('Airflow.paused') }}">
<meta name="tree_data" content="{{ url_for('Airflow.tree_data') }}">
{% if show_external_log_redirect is defined %}
<meta name="show_external_log_redirect" content="{{ show_external_log_redirect }}">
{% endif %}
Expand Down