ashb commented on a change in pull request #4929: [AIRFLOW-4108] Load 
autocomplete data asynchronously
URL: https://github.com/apache/airflow/pull/4929#discussion_r270363719
 
 

 ##########
 File path: airflow/www/views.py
 ##########
 @@ -282,9 +282,46 @@ def get_int_arg(value, default=0):
             paging=wwwutils.generate_pages(current_page, num_of_pages,
                                            search=arg_search_query,
                                            showPaused=not hide_paused),
-            auto_complete_data=auto_complete_data,
             num_runs=num_runs)
 
+    @expose('/dags_autocomplete')
+    @has_access
+    @provide_session
+    def dags_autocomplete(self, session):
+        arg_search_query = request.args.get('search', None)
+
+        if not arg_search_query:
+            return wwwutils.json_response({
+                'items': []
+            })
+
+        max_items_count = int(request.args.get('limit', 8))
+        filter_dag_ids = appbuilder.sm.get_accessible_dag_ids()
+
+        dags_query = session.query(DagModel.owners).filter(
+            ~DagModel.is_subdag, DagModel.is_active
 
 Review comment:
   Did the previous view show paused dags? (i.e. is this a change in behaviour?)

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

Reply via email to