[ https://issues.apache.org/jira/browse/AIRFLOW-3067?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xiaodong DENG updated AIRFLOW-3067: ----------------------------------- Description: The Flask flash messages are not categorized properly (ref: [http://flask.pocoo.org/docs/1.0/patterns/flashing/#flashing-with-categories).] Then the default category would be 'message'. Flask AppBuilder would assign CSS class `alert-[category]` to that message when displaying it (ref: [https://github.com/dpgaspar/Flask-AppBuilder/blob/master/flask_appbuilder/templates/appbuilder/flash.html] ). But 'alert-message' is not specified in *bootstrap-theme.css*. This makes the the flash messages in the _*www_rbac*_ UI come with no background color (please check the screenshots attached. We don't see this issue in _*www*_ UI as all flash messages without categories are classed into 'info'). Solution: * Add proper category when we invoke *flash()*. * We can't use category 'error'. In bootstrap-theme.css, we don't have `alert-error` (we have `alert-danger` instead). *Latest update:* we update bootstrap-theme.css, to add CSS classes 'alert-message' and 'alert-error'. This may help minimize the changes we need to do. was: The Flask flash messages are not categorized properly (ref: [http://flask.pocoo.org/docs/1.0/patterns/flashing/#flashing-with-categories).] Then the default category would be 'message'. Flask AppBuilder would assign CSS class `alert-[category]` to that message when displaying it (ref: [https://github.com/dpgaspar/Flask-AppBuilder/blob/master/flask_appbuilder/templates/appbuilder/flash.html] ). But 'alert-message' is not specified in *bootstrap-theme.css*. This makes the the flash messages in the _*www_rbac*_ UI come with no background color (please check the screenshots attached. We don't see this issue in _*www*_ UI as all flash messages without categories are classed into 'info'). Solution: * Add proper category when we invoke *flash()*. * We can't use category 'error'. In bootstrap-theme.css, we don't have `alert-error` (we have `alert-danger` instead). > (www_rbac) Flask flash messages are not displayed properly (no background > color) > -------------------------------------------------------------------------------- > > Key: AIRFLOW-3067 > URL: https://issues.apache.org/jira/browse/AIRFLOW-3067 > Project: Apache Airflow > Issue Type: Improvement > Components: webapp > Affects Versions: 1.10.0 > Reporter: Xiaodong DENG > Assignee: Xiaodong DENG > Priority: Minor > Fix For: 1.10.1 > > Attachments: 1.png, 2.png > > > The Flask flash messages are not categorized properly (ref: > [http://flask.pocoo.org/docs/1.0/patterns/flashing/#flashing-with-categories).] > Then the default category would be 'message'. Flask AppBuilder would assign > CSS class `alert-[category]` to that message when displaying it (ref: > [https://github.com/dpgaspar/Flask-AppBuilder/blob/master/flask_appbuilder/templates/appbuilder/flash.html] > ). But 'alert-message' is not specified in *bootstrap-theme.css*. This makes > the the flash messages in the _*www_rbac*_ UI come with no background color > (please check the screenshots attached. We don't see this issue in _*www*_ UI > as all flash messages without categories are classed into 'info'). > Solution: > * Add proper category when we invoke *flash()*. > * We can't use category 'error'. In bootstrap-theme.css, we don't have > `alert-error` (we have `alert-danger` instead). > > *Latest update:* > we update bootstrap-theme.css, to add CSS classes 'alert-message' and > 'alert-error'. This may help minimize the changes we need to do. -- This message was sent by Atlassian JIRA (v7.6.3#76005)