-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SLEEP-1499 Support embedding of Superset dashboard in Iaso #1698
base: main
Are you sure you want to change the base?
Conversation
- Add a new pages template that supports embedding a new type of page "SUPERSET" - Add an API endpoint POST /api/superset/token that creates a Superset "guest token" for a specific dashboard
SERVER_URL: | ||
SUPERSET_DB_NAME: | ||
SUPERSET_DB_HOSTNAME: | ||
SUPERSET_DB_PASSWORD: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is that here?
<head> | ||
<title>{{title}}</title> | ||
{{ analytics_script | safe }} | ||
<script src="https://unpkg.com/@superset-ui/embedded-sdk"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, we should have this copied in our code base and not depending on an external source
|
||
supersetEmbeddedSdk.embedDashboard({ | ||
id: '{{dashboard_id}}', | ||
supersetDomain: 'https://superset.trypelim.org', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Domain name seems hardcoded?
</head> | ||
|
||
<body> | ||
<div id="my-superset-container"></div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not very important, but why "my" ?
This PR contains a v1 for embedding Superset dashboards in Iaso, using the
Pages
model.Specifically:
/api/superset/token
that creates a Superset "guest token" for a specific dashboardRelated JIRA tickets : https://bluesquare.atlassian.net/browse/SLEEP-1499
Note that this is a v1. In order to make this properly usable for regular users, I think we should have a place where you can configure the connection to such a dashboard for a given account.
Doc
No docs yet since it's not really publicly usable yet. Like PowerBI, we can enable it by setting the page type to "Superset" via the admin, but not just any user can activate it since it requires ENV vars to be configured to a Superset server.
How to test
dashboard_id
.dashboard_id
you want to embed.