ryanahamilton commented on a change in pull request #11534:
URL: https://github.com/apache/airflow/pull/11534#discussion_r505506462



##########
File path: airflow/www/templates/airflow/graph.html
##########
@@ -453,27 +467,56 @@
           return false
       }
 
-      function initRefreshButton() {
-        d3.select("#refresh_button").on("click", () => {
-          $("#loading").css("display", "block");
-          $("div#svg_container").css("opacity", "0.2");
-          $.get(getTaskInstanceURL)
-            .done(
-              (tis) => {
-                task_instances = JSON.parse(tis)
-                updateNodesStates(task_instances);
-                $("#loading").hide();
-                $("div#svg_container").css("opacity", "1");
-                $('#error').hide();
-              }
-            ).fail((_, textStatus, err) => {
-              $('#error_msg').html(`${textStatus}: ${err}`);
-              $('#error').show();
-              $('#loading').hide();
-              $('#chart_section').hide(1000);
-              $('#datatable_section').hide(1000);
-            });
-        });
+      function handleRefresh() {
+        $('#loading-dots').css('display', 'inline-block');
+        $('.graph-svg-wrap').fadeTo(400, 0.5);
+        $.get(getTaskInstanceURL)
+          .done(
+            (tis) => {

Review comment:
       Well [up to IE 11 does not](https://caniuse.com/arrow-functions). This 
and the 7 other instances in this file were pre-existing. There appear to be 12 
instances total throughout all of the HTML template files. Maybe worth a 
follow-up PR to refactor all of them at once?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to