mirror of https://github.com/apache/superset.git
allow non-relative LOGO_TARGET_PATH (#8307)
This commit is contained in:
parent
3764d43f7f
commit
7ea769228e
|
@ -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 }}"
|
||||
|
|
Loading…
Reference in New Issue