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 2021/02/02 16:51:28 UTC

[GitHub] [airflow] ryanahamilton commented on a change in pull request #14019: Clean-up JS code in UI templates

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



##########
File path: airflow/www/templates/airflow/dag.html
##########
@@ -375,13 +375,13 @@ <h4 class="modal-title" id="dagModalLabel">
   {{ super() }}
   <script>
     function updateQueryStringParameter(uri, key, value) {
-      var re = new RegExp('([?&])' + key + '=.*?(&|$)', 'i');
+      var re = new RegExp(`([?&])${key}=.*?(&|$)`, 'i');

Review comment:
       Ideally, we'd start migrating these scripts to external (compiled) files to make this concern moot. I'm not _super_ concerned about IE support, but I wish we had actual usage data to better inform us. Google Analytics appears to be installed on the documentation site—maybe its browser usage reports could serve as proxy (better than nothing)?




----------------------------------------------------------------
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