[dashboard] fix standalone mode that hides the navbar (#3284)

This commit is contained in:
Maxime Beauchemin 2017-08-14 12:24:05 -07:00 committed by GitHub
parent c9c6bcaabe
commit 9a4e4d0443

View File

@ -1715,9 +1715,11 @@ class Superset(BaseSupersetView):
dash_save_perm = \
dash_edit_perm and self.can_access('can_save_dash', 'Superset')
standalone_mode = request.args.get("standalone") == "true"
dashboard_data = dash.data
dashboard_data.update({
'standalone_mode': request.args.get("standalone") == "true",
'standalone_mode': standalone_mode,
'dash_save_perm': dash_save_perm,
'dash_edit_perm': dash_edit_perm,
})
@ -1731,6 +1733,7 @@ class Superset(BaseSupersetView):
return self.render_template(
"superset/dashboard.html",
entry='dashboard',
standalone_mode=standalone_mode,
title='[dashboard] ' + dash.dashboard_title,
bootstrap_data=json.dumps(bootstrap_data),
)