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

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 7ea7692  allow non-relative LOGO_TARGET_PATH (#8307)
7ea7692 is described below

commit 7ea769228e5ca40cdbb47344904bd0efdccaf658
Author: ʈᵃᵢ <[email protected]>
AuthorDate: Fri Sep 27 19:47:20 2019 -0700

    allow non-relative LOGO_TARGET_PATH (#8307)
---
 superset/templates/appbuilder/navbar.html | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/superset/templates/appbuilder/navbar.html 
b/superset/templates/appbuilder/navbar.html
index 29c2241..72eefdf 100644
--- a/superset/templates/appbuilder/navbar.html
+++ b/superset/templates/appbuilder/navbar.html
@@ -21,6 +21,7 @@
 {% set WARNING_MSG = appbuilder.app.config.get('WARNING_MSG') %}
 {% set app_icon_width = appbuilder.app.config.get('APP_ICON_WIDTH', 126) %}
 {% set logo_target_path = appbuilder.app.config.get('LOGO_TARGET_PATH') or 
'/profile/{}/'.format(current_user.username) %}
+{% set root_path = logo_target_path if not logo_target_path.startswith('/') 
else '/superset' + logo_target_path if current_user.username is defined else 
'#'  %}
 
 <div class="navbar navbar-static-top {{menu.extra_classes}}" role="navigation">
   <div class="container-fluid">
@@ -30,7 +31,7 @@
         <span class="icon-bar"></span>
         <span class="icon-bar"></span>
       </button>
-      <a class="navbar-brand" href="{{ '/superset' + logo_target_path if 
current_user.username is defined else '#' }}">
+      <a class="navbar-brand" href="{{ root_path }}">
         <img
           width="{{ app_icon_width }}"
           src="{{ appbuilder.app_icon }}"

Reply via email to