feat: server side dashboard css for less repaint (#10850)

This commit is contained in:
Jesse Yang 2020-09-13 21:32:43 -07:00 committed by GitHub
parent 686c19abcf
commit 1f31e0eb38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -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 %}

View File

@ -1700,6 +1700,7 @@ class Superset(BaseSupersetView): # pylint: disable=too-many-public-methods
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
),