From 231d82675771ae74dbdae5322fdeb76a8e18e1b4 Mon Sep 17 00:00:00 2001 From: Christine Chambers Date: Wed, 6 Feb 2019 15:41:19 -0800 Subject: [PATCH] Make the target path of the superset logo configuable (#6815) * Make the target path of the superset logo configuable There is a need to have the target path of the logo go to different places in different installations of superset. The PR makes the target path (after `/superset`) configurable via the LOGO_TARGET_PATH configuration key and sets the default to the existing `/profile/{{ current_user.username }}/` * addressing pr comments --- superset/config.py | 4 ++++ superset/templates/appbuilder/navbar.html | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/superset/config.py b/superset/config.py index 31bede6eb3e18..5e46c5f4bbd3b 100644 --- a/superset/config.py +++ b/superset/config.py @@ -112,6 +112,10 @@ APP_ICON = '/static/assets/images/superset-logo@2x.png' APP_ICON_WIDTH = 126 +# Uncomment to specify where clicking the logo would take the user +# e.g. setting it to '/welcome' would take the user to '/superset/welcome' +LOGO_TARGET_PATH = None + # Druid query timezone # tz.tzutc() : Using utc timezone # tz.tzlocal() : Using local timezone diff --git a/superset/templates/appbuilder/navbar.html b/superset/templates/appbuilder/navbar.html index 88f491999ae20..b5cfc642c8321 100644 --- a/superset/templates/appbuilder/navbar.html +++ b/superset/templates/appbuilder/navbar.html @@ -20,6 +20,7 @@ {% set languages = appbuilder.languages %} {% 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) %}