Skip to content

Commit

Permalink
feat: server side dashboard css for less repaint
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmud committed Sep 12, 2020
1 parent 686c19a commit f434b22
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions superset/templates/superset/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
#}
{% extends "superset/basic.html" %}

{% block head_css %}
{{ super() }}
{% if custom_css %}
<style class="CssEditor-css" type="text/css">
{{ custom_css }}
</style>
{% endif %}
{% endblock %}

{% block body %}
<div id="app" data-bootstrap="{{ bootstrap_data }}" />
{% endblock %}
1 change: 1 addition & 0 deletions superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1700,6 +1700,7 @@ def dashboard(**_: Any) -> None:
entry="dashboard",
standalone_mode=standalone_mode,
title=dash.dashboard_title,
custom_css=dashboard_data.get("css"),
bootstrap_data=json.dumps(
bootstrap_data, default=utils.pessimistic_json_iso_dttm_ser
),
Expand Down

0 comments on commit f434b22

Please sign in to comment.