mirror of https://github.com/apache/superset.git
fix: Dashboad export loading indicator (#17613)
This commit is contained in:
parent
78c5d9ac27
commit
76cd7b0481
|
@ -722,9 +722,9 @@ class DashboardRestApi(BaseSupersetModelRestApi):
|
||||||
$ref: '#/components/responses/500'
|
$ref: '#/components/responses/500'
|
||||||
"""
|
"""
|
||||||
requested_ids = kwargs["rison"]
|
requested_ids = kwargs["rison"]
|
||||||
|
token = request.args.get("token")
|
||||||
|
|
||||||
if is_feature_enabled("VERSIONED_EXPORT"):
|
if is_feature_enabled("VERSIONED_EXPORT"):
|
||||||
token = request.args.get("token")
|
|
||||||
timestamp = datetime.now().strftime("%Y%m%dT%H%M%S")
|
timestamp = datetime.now().strftime("%Y%m%dT%H%M%S")
|
||||||
root = f"dashboard_export_{timestamp}"
|
root = f"dashboard_export_{timestamp}"
|
||||||
filename = f"{root}.zip"
|
filename = f"{root}.zip"
|
||||||
|
@ -763,6 +763,8 @@ class DashboardRestApi(BaseSupersetModelRestApi):
|
||||||
resp.headers["Content-Disposition"] = generate_download_headers("json")[
|
resp.headers["Content-Disposition"] = generate_download_headers("json")[
|
||||||
"Content-Disposition"
|
"Content-Disposition"
|
||||||
]
|
]
|
||||||
|
if token:
|
||||||
|
resp.set_cookie(token, "done", max_age=600)
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
@expose("/<pk>/thumbnail/<digest>/", methods=["GET"])
|
@expose("/<pk>/thumbnail/<digest>/", methods=["GET"])
|
||||||
|
|
Loading…
Reference in New Issue