mirror of
https://github.com/apache/superset.git
synced 2026-06-05 15:49:27 +00:00
allow non-relative LOGO_TARGET_PATH (#8307)
This commit is contained in:
@@ -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 }}"
|
||||
|
||||
Reference in New Issue
Block a user