shuwen-zhang commented on a change in pull request #5516: [AIRFLOW-4884] Roll 
up import_errors in UI
URL: https://github.com/apache/airflow/pull/5516#discussion_r301746338
 
 

 ##########
 File path: airflow/www/templates/appbuilder/flash.html
 ##########
 @@ -0,0 +1,68 @@
+<!-- Adapted from: 
https://github.com/dpgaspar/Flask-AppBuilder/blob/master/flask_appbuilder/templates/appbuilder/flash.html
 -->
+
+<link rel="stylesheet" type="text/css" href="{{ url_for('static', 
filename='css/flash.css') }}">
+
+<!-- Split array into two arrays: one about Broken DAG, another normal alert  
-->
+{% with messages = get_flashed_messages(with_categories=true) %}
+    {% if messages %}
+
+        {% set broken_dag_messages = [] %}
+        {% set other_messages = [] %}
+
+        {% for category, m in messages %}
+            {% if m.startswith('Broken DAG') %}
 
 Review comment:
   Great, I’ve added `dag_import_error` as the new category name in `views.py` 
and updated the rendering code in `flash.html`. We agree that having the stack 
trace would be beneficial. If it’s OK, we’d like to do that in a follow-up pull 
request, so we can get this unit of work in first.

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