You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ur...@apache.org on 2022/07/25 09:09:52 UTC

[airflow] branch main updated: Remove support for FAB `APP_THEME` (#15277)

This is an automated email from the ASF dual-hosted git repository.

uranusjr pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new f634361cb7 Remove support for FAB `APP_THEME` (#15277)
f634361cb7 is described below

commit f634361cb7c1aa13deb098252784624a59339cad
Author: Ryan Hamilton <ry...@ryanahamilton.com>
AuthorDate: Mon Jul 25 05:09:40 2022 -0400

    Remove support for FAB `APP_THEME` (#15277)
---
 .../config_templates/default_webserver_config.py   | 28 ----------------------
 ...strap-theme.css => airflow_bootstrap_theme.css} |  0
 airflow/www/templates/airflow/main.html            |  6 +----
 airflow/www/webpack.config.js                      |  2 +-
 4 files changed, 2 insertions(+), 34 deletions(-)

diff --git a/airflow/config_templates/default_webserver_config.py b/airflow/config_templates/default_webserver_config.py
index 5c7eaa1b16..73721571a8 100644
--- a/airflow/config_templates/default_webserver_config.py
+++ b/airflow/config_templates/default_webserver_config.py
@@ -98,31 +98,3 @@ AUTH_TYPE = AUTH_DB
 #    { 'name': 'AOL', 'url': 'http://openid.aol.com/<username>' },
 #    { 'name': 'Flickr', 'url': 'http://www.flickr.com/<username>' },
 #    { 'name': 'MyOpenID', 'url': 'https://www.myopenid.com' }]
-
-# ----------------------------------------------------
-# Theme CONFIG
-# ----------------------------------------------------
-# Flask App Builder comes up with a number of predefined themes
-# that you can use for Apache Airflow.
-# http://flask-appbuilder.readthedocs.io/en/latest/customizing.html#changing-themes
-# Please make sure to remove "navbar_color" configuration from airflow.cfg
-# in order to fully utilize the theme. (or use that property in conjunction with theme)
-# APP_THEME = "bootstrap-theme.css"  # default bootstrap
-# APP_THEME = "amelia.css"
-# APP_THEME = "cerulean.css"
-# APP_THEME = "cosmo.css"
-# APP_THEME = "cyborg.css"
-# APP_THEME = "darkly.css"
-# APP_THEME = "flatly.css"
-# APP_THEME = "journal.css"
-# APP_THEME = "lumen.css"
-# APP_THEME = "paper.css"
-# APP_THEME = "readable.css"
-# APP_THEME = "sandstone.css"
-# APP_THEME = "simplex.css"
-# APP_THEME = "slate.css"
-# APP_THEME = "solar.css"
-# APP_THEME = "spacelab.css"
-# APP_THEME = "superhero.css"
-# APP_THEME = "united.css"
-# APP_THEME = "yeti.css"
diff --git a/airflow/www/static/css/bootstrap-theme.css b/airflow/www/static/css/airflow_bootstrap_theme.css
similarity index 100%
rename from airflow/www/static/css/bootstrap-theme.css
rename to airflow/www/static/css/airflow_bootstrap_theme.css
diff --git a/airflow/www/templates/airflow/main.html b/airflow/www/templates/airflow/main.html
index ffebe05c00..28b28e2dde 100644
--- a/airflow/www/templates/airflow/main.html
+++ b/airflow/www/templates/airflow/main.html
@@ -37,11 +37,7 @@
 
 {% block head_css %}
   {{ super() }}
-
-  {% if not appbuilder.app_theme %}
-    {# airflowDefaultTheme.css file contains the styles from local bootstrap-theme.css #}
-    <link rel="stylesheet" type="text/css" href="{{ url_for_asset('airflowDefaultTheme.css') }}">
-  {% endif %}
+  <link rel="stylesheet" type="text/css" href="{{ url_for_asset('airflowBootstrapTheme.css') }}">
   <link rel="stylesheet" type="text/css" href="{{ url_for_asset('materialIcons.css') }}">
   <link rel="stylesheet" type="text/css" href="{{ url_for_asset('main.css') }}">
   <link rel="stylesheet" type="text/css" href="{{ url_for_asset('loadingDots.css') }}">
diff --git a/airflow/www/webpack.config.js b/airflow/www/webpack.config.js
index 49b546ab40..f125c1a7b1 100644
--- a/airflow/www/webpack.config.js
+++ b/airflow/www/webpack.config.js
@@ -55,7 +55,7 @@ Foundation (http://www.apache.org/).
 
 const config = {
   entry: {
-    airflowDefaultTheme: `${CSS_DIR}/bootstrap-theme.css`,
+    airflowBootstrapTheme: `${CSS_DIR}/airflow_bootstrap_theme.css`,
     connectionForm: `${JS_DIR}/connection_form.js`,
     chart: [`${CSS_DIR}/chart.css`],
     dag: `${JS_DIR}/dag.js`,