Skip to content

Commit

Permalink
fix task instance modal open performance issue (#10764)
Browse files Browse the repository at this point in the history
This reduces the task instance modal open wait time for large DAGs with
extra links from minutes to 6 ms, an order of 10000 times speed up.

GitOrigin-RevId: 3a4f51775f014d218e87bddeebc73172ec1a7d63
  • Loading branch information
QP Hou authored and Cloud Composer Team committed Oct 7, 2022
1 parent f4d8c8a commit ce7fdee
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions airflow/www/templates/airflow/dag.html
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ <h4 class="modal-title" id="dagModalLabel">
"&dag_id=" + encodeURIComponent(dag_id) +
"&execution_date=" + encodeURIComponent(execution_date) +
"&link_name=" + encodeURIComponent(link);
var external_link = $('<a href="#" data-toggle="tooltip" class="btn btn-primary disabled" target="_blank"></a>')
var external_link = $('<a href="#" class="btn btn-primary disabled" target="_blank"></a>')
var link_tooltip = $('<span class="tool-tip" data-toggle="tooltip" style="padding-right: 2px; padding-left: 3px" data-placement="top" ' +
'title="link not yet available"></span>');
link_tooltip.append(external_link)
Expand All @@ -500,9 +500,10 @@ <h4 class="modal-title" id="dagModalLabel">
markupArr.push(link_tooltip)
});

$('#extra_links').prev('hr').show();
$('#extra_links').append(markupArr).show();
$('[data-toggle="tooltip"]').tooltip();
var extra_links_span = $('#extra_links');
extra_links_span.prev('hr').show();
extra_links_span.append(markupArr).show();
extra_links_span.find('[data-toggle="tooltip"]').tooltip();
}
}

Expand Down

0 comments on commit ce7fdee

Please sign in to comment.