jmcarp commented on a change in pull request #4787: [AIRFLOW-3967] Extract 
Jinja directive from Javascript
URL: https://github.com/apache/airflow/pull/4787#discussion_r261225208
 
 

 ##########
 File path: airflow/www/templates/airflow/graph.html
 ##########
 @@ -103,15 +113,16 @@
     var initialStrokeWidth = '3px';
     var highlightStrokeWidth = '5px';
 
-    var nodes = {{ nodes|safe }};
-    var edges = {{ edges|safe }};
-    var execution_date = "{{ execution_date }}";
-    var arrange = "{{ arrange }}";
+    var nodes = JSON.parse(getMetaValue('nodes'));
+    var edges = JSON.parse(getMetaValue('edges'));
+    var execution_date = getMetaValue('execution-date');
+    var arrange = getMetaValue('arrange');
+    var tasks = JSON.parse(getMetaValue('tasks'));
+    var task_instances =  JSON.parse(getMetaValue('task-instances'));
 
 Review comment:
   I see that this was the original variable name, but if we're cleaning up the 
js, maybe we can use camelCase consistently.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to