mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
feat: new reports scheduler (#11711)
* feat(reports): scheduler and delivery system * working version * improvements and fix grace_period * add tests and fix bugs * fix report API test * test MySQL test fail * delete-orphans * fix MySQL tests * address comments * lint
This commit is contained in:
committed by
GitHub
parent
501b9d47c5
commit
f27ebc4be5
@@ -20,11 +20,15 @@ from typing import Any
|
||||
from flask import current_app, url_for
|
||||
|
||||
|
||||
def headless_url(path: str) -> str:
|
||||
base_url = current_app.config.get("WEBDRIVER_BASEURL", "")
|
||||
def headless_url(path: str, user_friendly: bool = False) -> str:
|
||||
base_url = (
|
||||
current_app.config["WEBDRIVER_BASEURL_USER_FRIENDLY"]
|
||||
if user_friendly
|
||||
else current_app.config["WEBDRIVER_BASEURL"]
|
||||
)
|
||||
return urllib.parse.urljoin(base_url, path)
|
||||
|
||||
|
||||
def get_url_path(view: str, **kwargs: Any) -> str:
|
||||
def get_url_path(view: str, user_friendly: bool = False, **kwargs: Any) -> str:
|
||||
with current_app.test_request_context():
|
||||
return headless_url(url_for(view, **kwargs))
|
||||
return headless_url(url_for(view, **kwargs), user_friendly=user_friendly)
|
||||
|
||||
Reference in New Issue
Block a user