airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fo...@apache.org
Subject incubator-airflow git commit: [AIRFLOW-2431] Add the navigation bar color parameter for RBAC UI
Date Tue, 08 May 2018 07:28:21 GMT
Repository: incubator-airflow
Updated Branches:
  refs/heads/master b9eb52cc0 -> 281a08172


[AIRFLOW-2431] Add the navigation bar color parameter for RBAC UI

Closes #3326 from jgao54/navbar-color


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/281a0817
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/281a0817
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/281a0817

Branch: refs/heads/master
Commit: 281a08172803bf5843f73e3b51f238eda6fc6f0f
Parents: b9eb52c
Author: Joy Gao <Joygao@apache.org>
Authored: Tue May 8 09:28:14 2018 +0200
Committer: Fokko Driesprong <fokkodriesprong@godatadriven.com>
Committed: Tue May 8 09:28:14 2018 +0200

----------------------------------------------------------------------
 airflow/www_rbac/app.py                           | 1 +
 airflow/www_rbac/templates/appbuilder/navbar.html | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/281a0817/airflow/www_rbac/app.py
----------------------------------------------------------------------
diff --git a/airflow/www_rbac/app.py b/airflow/www_rbac/app.py
index 572a7a3..85125c6 100644
--- a/airflow/www_rbac/app.py
+++ b/airflow/www_rbac/app.py
@@ -147,6 +147,7 @@ def create_app(config=None, testing=False, app_name="Airflow"):
         def jinja_globals():
             return {
                 'hostname': socket.getfqdn(),
+                'navbar_color': conf.get('webserver', 'NAVBAR_COLOR'),
             }
 
         @app.teardown_appcontext

http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/281a0817/airflow/www_rbac/templates/appbuilder/navbar.html
----------------------------------------------------------------------
diff --git a/airflow/www_rbac/templates/appbuilder/navbar.html b/airflow/www_rbac/templates/appbuilder/navbar.html
index d2c9e1d..e2d8c06 100644
--- a/airflow/www_rbac/templates/appbuilder/navbar.html
+++ b/airflow/www_rbac/templates/appbuilder/navbar.html
@@ -18,7 +18,7 @@
 {% set menu = appbuilder.menu %}
 {% set languages = appbuilder.languages %}
 
-<div class="navbar navbar-inverse navbar-fixed-top {{menu.extra_classes}}" role="navigation">
+<div class="navbar navbar-inverse navbar-fixed-top {{menu.extra_classes}}" role="navigation"
style="background-color: {{ navbar_color }};">
    <div class="container">
         <div class="navbar-header">
             <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">


Mime
View raw message