You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by yj...@apache.org on 2020/09/14 04:33:16 UTC
[incubator-superset] branch master updated: feat: server side
dashboard css for less repaint (#10850)
This is an automated email from the ASF dual-hosted git repository.
yjc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 1f31e0e feat: server side dashboard css for less repaint (#10850)
1f31e0e is described below
commit 1f31e0eb38a473381a47f4fce62267e09eba25ef
Author: Jesse Yang <je...@airbnb.com>
AuthorDate: Sun Sep 13 21:32:43 2020 -0700
feat: server side dashboard css for less repaint (#10850)
---
superset/templates/superset/dashboard.html | 9 +++++++++
superset/views/core.py | 1 +
2 files changed, 10 insertions(+)
diff --git a/superset/templates/superset/dashboard.html b/superset/templates/superset/dashboard.html
index 813ffe1..ed481a2 100644
--- a/superset/templates/superset/dashboard.html
+++ b/superset/templates/superset/dashboard.html
@@ -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 %}
diff --git a/superset/views/core.py b/superset/views/core.py
index 070d84f..3f0c477 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -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
),