mik-laj commented on a change in pull request #4787: [AIRFLOW-3967] Extract
Jinja directive from Javascript
URL: https://github.com/apache/airflow/pull/4787#discussion_r261334485
##########
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 would like to introduce it in a separate PR. I have a PR in queue, which
introduce linting for all JS (*.js, *.html). This allows me to deal with the
problem globally instead of making changes only locally. Solving the problem
locally will not be permanent, so it should only be used when there is no other
possibility.
----------------------------------------------------------------
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