Skip to content

Commit

Permalink
[AIRFLOW-2431] Add the navigation bar color parameter for RBAC UI
Browse files Browse the repository at this point in the history
Closes apache#3326 from jgao54/navbar-color

(cherry picked from commit 281a081)
Signed-off-by: Fokko Driesprong <[email protected]>
  • Loading branch information
Joy Gao authored and Fokko Driesprong committed May 8, 2018
1 parent 60dce37 commit c50093d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions airflow/www_rbac/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def init_views(appbuilder):
def jinja_globals():
return {
'hostname': socket.getfqdn(),
'navbar_color': conf.get('webserver', 'NAVBAR_COLOR'),
}

@app.teardown_appcontext
Expand Down
2 changes: 1 addition & 1 deletion airflow/www_rbac/templates/appbuilder/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down

0 comments on commit c50093d

Please sign in to comment.