-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
refactor(Dashboard): Fetch dashboard screenshot via dedicated endpoint #29272
Conversation
/testenv up |
@kgabryje Ephemeral environment spinning up at http://54.186.201.2:8080. Credentials are |
superset-frontend/src/dashboard/components/menu/DownloadMenuItems/index.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx
Outdated
Show resolved
Hide resolved
I couldn't get it to work on ephemeral env (both image and pdf) EDIT: Sorry, I didn't notice that the endpoint PR is not merged yet. |
superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx
Outdated
Show resolved
Hide resolved
…o/refactor/dashboard-screenshot
…o/refactor/dashboard-screenshot
/testenv up |
@geido Ephemeral environment spinning up at http://52.36.201.158:8080. Credentials are |
…o/refactor/dashboard-screenshot
/testenv up |
@geido Ephemeral environment spinning up at http://35.95.67.178:8080. Credentials are |
superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadScreenshot.tsx
Show resolved
Hide resolved
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.
LGTM
Ephemeral environment shutdown and build artifacts deleted. |
Hi there. Python 3.11.7 venv on Rocky Linux 9.4 x86_64, backend is PostgreSQL 16.4 through pgbouncer 1.23.1 (coming from PGDG repo) using
Trying to dig deeper and have proper logs. If anyone has a clue, I can give it a try. |
This may be the culprit of PDF export failure but can’t be sure about that. Hope that helps anyway. |
SUMMARY
A dashboard can have an image attached in the markdown component that is hosted on a server that does not have proper CORS settings. Due to limitations of html2canvas, both PDF and image download will fail.
For reference from html2canvas:
This PR introduces the necessary frontend changes to defer the generation of the screenshot to a newly built endpoint. See #29187
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION