You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ta...@apache.org on 2021/01/08 02:53:33 UTC
[superset] branch master updated: feat: provide support for an
overridable template to be included in every view (#12315)
This is an automated email from the ASF dual-hosted git repository.
tai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new cbda599 feat: provide support for an overridable template to be included in every view (#12315)
cbda599 is described below
commit cbda599406c3c0b18e803211a87745749dfb0f2c
Author: ʈᵃᵢ <td...@gmail.com>
AuthorDate: Thu Jan 7 18:52:46 2021 -0800
feat: provide support for an overridable template to be included in every view (#12315)
---
superset/templates/superset/base.html | 1 +
superset/templates/superset/basic.html | 1 +
superset/templates/superset/crud_views.html | 1 +
.../{superset/crud_views.html => tail_js_custom_extra.html} | 13 ++++++-------
4 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/superset/templates/superset/base.html b/superset/templates/superset/base.html
index 30cb416..a861c65 100644
--- a/superset/templates/superset/base.html
+++ b/superset/templates/superset/base.html
@@ -34,4 +34,5 @@
{{ super() }}
{{ js_bundle("preamble") }}
{{ js_bundle('menu') }}
+ {% include "tail_js_custom_extra.html" %}
{% endblock %}
diff --git a/superset/templates/superset/basic.html b/superset/templates/superset/basic.html
index 24716ba..902fc8c 100644
--- a/superset/templates/superset/basic.html
+++ b/superset/templates/superset/basic.html
@@ -103,6 +103,7 @@
{% if entry %}
{{ js_bundle(entry) }}
{% endif %}
+ {% include "tail_js_custom_extra.html" %}
{% endblock %}
</body>
</html>
diff --git a/superset/templates/superset/crud_views.html b/superset/templates/superset/crud_views.html
index 57c49ae..862b791 100644
--- a/superset/templates/superset/crud_views.html
+++ b/superset/templates/superset/crud_views.html
@@ -23,4 +23,5 @@
{% block tail_js %}
{{ js_bundle("crudViews") }}
+ {% include "tail_js_custom_extra.html" %}
{% endblock %}
diff --git a/superset/templates/superset/crud_views.html b/superset/templates/tail_js_custom_extra.html
similarity index 76%
copy from superset/templates/superset/crud_views.html
copy to superset/templates/tail_js_custom_extra.html
index 57c49ae..5989054 100644
--- a/superset/templates/superset/crud_views.html
+++ b/superset/templates/tail_js_custom_extra.html
@@ -16,11 +16,10 @@
specific language governing permissions and limitations
under the License.
#}
-{% extends "superset/basic.html" %}
-{% block navbar %}
-{% endblock %}
-
-{% block tail_js %}
- {{ js_bundle("crudViews") }}
-{% endblock %}
+{#
+ This file may be overriden in your custom deployment.
+ It will be included in every view in superset and is a
+ good place to include your custom frontend code, such as
+ scripts to initialize google analytics, intercom, segment, etc.
+#}