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:
Mehmet Salih Yavuz
2024-11-13 15:16:33 +03:00
committed by GitHub
parent a7069e60e2
commit 58f9be9b85

View File

@@ -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