airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] zacharya19 commented on a change in pull request #6489: [AIRFLOW-3959] add UI filter with DAGs tags
Date Sun, 03 Nov 2019 08:53:29 GMT
zacharya19 commented on a change in pull request #6489: [AIRFLOW-3959] add UI filter with DAGs
tags
URL: https://github.com/apache/airflow/pull/6489#discussion_r341841252
 
 

 ##########
 File path: airflow/www/views.py
 ##########
 @@ -246,10 +266,20 @@ def get_int_arg(value, default=0):
                     DagModel.owners.ilike('%' + arg_search_query + '%')
                 )
 
+            if arg_tags_filter:
+                dags_query = dags_query.filter(DagModel.tags.any(DagTag.name.in_(arg_tags_filter)))
+
             if 'all_dags' not in filter_dag_ids:
                 dags_query = dags_query.filter(DagModel.dag_id.in_(filter_dag_ids))
 
             dags = dags_query.order_by(DagModel.dag_id).offset(start).limit(dags_per_page).all()
+            tags = []
+
+            for name, in session.query(DagTag.name).distinct(DagTag.name).all():
 
 Review comment:
   It will select only one column, but it will return a list of tuples, so the comma is in
order to unpack the first item.

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

Mime
View raw message