mirror of
https://github.com/apache/superset.git
synced 2026-04-07 10:31:50 +00:00
fix(empty dashboards): Allow downloading a screenshot of an empty dashboard (#30767)
Co-authored-by: Geido <60598000+geido@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a7069e60e2
commit
58f9be9b85
@@ -379,11 +379,19 @@ class WebDriverSelenium(WebDriverProxy):
|
||||
)
|
||||
)
|
||||
except TimeoutException:
|
||||
logger.exception(
|
||||
"Selenium timed out waiting for chart containers to draw at url %s",
|
||||
url,
|
||||
)
|
||||
raise
|
||||
# Fallback to allow a screenshot of an empty dashboard
|
||||
try:
|
||||
WebDriverWait(driver, 0).until(
|
||||
EC.visibility_of_all_elements_located(
|
||||
(By.CLASS_NAME, "grid-container")
|
||||
)
|
||||
)
|
||||
except:
|
||||
logger.exception(
|
||||
"Selenium timed out waiting for dashboard to draw at url %s",
|
||||
url,
|
||||
)
|
||||
raise
|
||||
|
||||
try:
|
||||
# charts took too long to load
|
||||
|
||||
Reference in New Issue
Block a user