You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modify your nginx config file (docker/nginx/nginx.conf) to allow for embedding
# Inside http > server > location /
# Add the following lines:
proxy_hide_header X-Frame-Options;
add_header X-Frame-Options ALLOWALL always;
docker-compose up
Wait for superset_init to load the examples DB (takes some time)
Create a local web-server that can host an HTML file (I used live server in VS Code). Take note of the port that will be used by the web-server (in my case, :5500).
Open up superset in your http://localhost and login. Observe that the site is displayed in French (as configured).
Pick any dashboard. Open the Embedding dialog via the dashboard options ... > Embed Dashboard button.
Allow the local webserver to embed the dashboard by entering it in the text field (in my case, http://127.0.0.1:5500), then click "Save Changes". Take note of the generated UUID for the dashboard.
Create the following HTML file in your local web-server (be sure to replace the UUID in the options):
<html><head></head><body><divclass="container" id="container"></div><scriptsrc="https://unpkg.com/superset-embedded-sdk"></script><script>supersetEmbeddedSdk.embedDashboard({id: '<insert embedded id here>',// given by the Superset embedding UIsupersetDomain: 'http://localhost',mountPoint: document.getElementById('container'),// any html element that can contain an iframefetchGuestToken: ()=>'asdfasdcad',// guest_tokendashboardUiConfig: {urlParams: {lang: 'fr'}}// dashboard UI config: hideTitle, hideTab, hideChartControls (optional)});</script></body></html>
Open your local webserver http://127.0.0.1:5500 and observe the English error message.
Screenshots/recordings
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
The code is actually hard-coded to use English. However I have a patch that I'll be creating (to be linked shortly) to fix this, and it still doesn't solve the problem.
Checklist
I have searched Superset docs and Slack and didn't find a solution to my problem.
I have searched the GitHub issue tracker and didn't find a similar bug report.
I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
The text was updated successfully, but these errors were encountered:
The related PR adds the translatable strings, but does not solve the issue. Even with the translation function added, and the translation strings defined, the error still exists.
At risk of duplicating efforts, I opened a similar PR here using the latest translation scripts, which have been revised a bit since this was opened. Wish me luck! #29782
Bug description
If a failure occurs while attempting to load an embedded dashboard, the error message displayed is always in English.
In the example below, the guest token is invalid. The server is configured to only use French (as laid out in the reproduction steps).
How to reproduce the bug
Reproduction steps below utilize docker-compose, based on the current master branch.
docker-compose up
superset_init
to load the examples DB (takes some time):5500
).http://localhost
and login. Observe that the site is displayed in French (as configured).... > Embed Dashboard
button.http://127.0.0.1:5500
), then click "Save Changes". Take note of the generated UUID for the dashboard.http://127.0.0.1:5500
and observe the English error message.Screenshots/recordings
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
The code is actually hard-coded to use English. However I have a patch that I'll be creating (to be linked shortly) to fix this, and it still doesn't solve the problem.
Checklist
The text was updated successfully, but these errors were encountered: