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_r263336587
##########
File path: airflow/www/templates/airflow/dag_code.html
##########
@@ -18,18 +18,25 @@
{% extends "airflow/dag.html" %}
{% block title %}Airflow - DAGs{% endblock %}
+{% block head_css %}
+ {{ super() }}
+ <meta name="demo-mode" content="{{ demo_mode }}">
+{% endblock %}
+
{% block content %}
{{ super() }}
<h4>{{ title }}</h4>
{{ html_code|safe }}
{% endblock %}
{% block tail %}
+ <script src="{{ url_for_asset('utils.js') }}"></script>
{{ super() }}
<script>
+ const DEMO_MODE = getMetaValue('demo-mode');
// We blur task_ids in demo mode
$( document ).ready(function() {
- if ("{{ demo_mode }}" == "True") {
+ if (DEMO_MODE == "True") {
Review comment:
This feature is useful for conferences and presentations. You can show the
complexity of your DAGs, but do not show what they do. I agree that the
usability of this feature is very limited and we should think about deleting
it.
----------------------------------------------------------------
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]
With regards,
Apache Git Services