You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/08/19 08:44:36 UTC

[GitHub] [airflow] ashb commented on a change in pull request #5850: [AIRFLOW-1498] Add analytics script

ashb commented on a change in pull request #5850: [AIRFLOW-1498] Add analytics script
URL: https://github.com/apache/airflow/pull/5850#discussion_r315096729
 
 

 ##########
 File path: airflow/www/templates/appbuilder/baselayout.html
 ##########
 @@ -75,15 +75,46 @@
 
 
 {% block tail_js %}
-{{ super() }}
-<script type="text/javascript">
-  // below variables are used in base.js
-  var hostName = '{{ hostname }}';
-  var csrfToken = '{{ csrf_token() }}';
-  $("time[title]").tooltip()
-</script>
-<!--[if IE ]>
-<script src="{{ url_for_asset('ie.js') }}" type="text/javascript"></script>
-<![endif]-->
-<script src="{{ url_for_asset('base.js') }}" type="text/javascript"></script>
+  {{ super() }}
+
+  <script type="text/javascript">
+    // below variables are used in base.js
+    var hostName = '{{ hostname }}';
+    var csrfToken = '{{ csrf_token() }}';
+    $("time[title]").tooltip()
+  </script>
+  <!--[if IE ]>
+  <script src="{{ url_for_asset('ie.js') }}" type="text/javascript"></script>
+  <![endif]-->
+  <script src="{{ url_for_asset('base.js') }}" type="text/javascript"></script>
+
+  {% if analytics_tool == 'google_analytics' %}
 
 Review comment:
   Maybe to make this a bit easier to manger we could do:
   
   ```
          {% include "analytics_" + analytics_tool + "-partial.html" %}
   ```
   
   And then have `analytics_google_analytics-partial.html`, `analytics_segmet-partial.html` etc.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services