This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin 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 6e91305 Add .standalone class to <body> when in standalone mode
(#6811)
6e91305 is described below
commit 6e9130550dd07e2b7a8e2c819ee6f212a34c28cb
Author: Raphaƫl Merx <[email protected]>
AuthorDate: Tue Feb 5 09:44:17 2019 +0900
Add .standalone class to <body> when in standalone mode (#6811)
* Add .standalone class to <body> when in standalone mode
* Add test for .standalone class on <body>
---
superset/templates/superset/basic.html | 2 +-
tests/dashboard_tests.py | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/superset/templates/superset/basic.html
b/superset/templates/superset/basic.html
index eec686e..28835d1 100644
--- a/superset/templates/superset/basic.html
+++ b/superset/templates/superset/basic.html
@@ -59,7 +59,7 @@
>
</head>
- <body>
+ <body {% if standalone_mode %}class="standalone"{% endif %}>
{% block navbar %}
{% if not standalone_mode %}
<header class="top" role="header">
diff --git a/tests/dashboard_tests.py b/tests/dashboard_tests.py
index bf3e7d1..c436753 100644
--- a/tests/dashboard_tests.py
+++ b/tests/dashboard_tests.py
@@ -93,6 +93,7 @@ class DashboardTests(SupersetTestCase):
resp = self.get_resp(url + 'edit=true&standalone=true')
self.assertIn('editMode": true', resp)
self.assertIn('standalone_mode": true', resp)
+ self.assertIn('<body class="standalone">', resp)
def test_save_dash(self, username='admin'):
self.login(username=username)