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 2020/02/24 10:17:32 UTC

[GitHub] [airflow] robinedwards commented on a change in pull request #7251: [AIRFLOW-6628] Fix search auto complete behaviour

robinedwards commented on a change in pull request #7251: [AIRFLOW-6628] Fix search auto complete behaviour
URL: https://github.com/apache/airflow/pull/7251#discussion_r383178778
 
 

 ##########
 File path: airflow/www/views.py
 ##########
 @@ -2720,3 +2714,36 @@ def get_count_query(self):
             .filter(models.DagModel.is_active)
             .filter(~models.DagModel.is_subdag)
         )
+
+    @has_access
+    @permission_name("list")
+    @provide_session
+    @expose('/autocomplete')
+    def autocomplete(self, session=None):
+        query = unquote(request.args.get('query', ''))
 
 Review comment:
   So i just tested this locally https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams does URL encoding for us so we need the unquote. Its unlikely that a dag_id would have any special character but the owner field could potentially have anything.

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