mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
chore: move dashboard screenshot standalone logic (#23003)
This commit is contained in:
committed by
GitHub
parent
f6c304437a
commit
4ddf67fc14
@@ -22,7 +22,6 @@ from celery.utils.abstract import CallableTask
|
||||
from flask.cli import with_appcontext
|
||||
|
||||
from superset.extensions import db
|
||||
from superset.utils.urls import get_url_path
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -94,13 +93,7 @@ def compute_thumbnails(
|
||||
action = "Processing"
|
||||
msg = f'{action} {friendly_type} "{model}" ({i+1}/{count})'
|
||||
click.secho(msg, fg="green")
|
||||
if friendly_type == "chart":
|
||||
url = get_url_path(
|
||||
"Superset.slice", slice_id=model.id, standalone="true"
|
||||
)
|
||||
else:
|
||||
url = get_url_path("Superset.dashboard", dashboard_id_or_slug=model.id)
|
||||
func(url, model.digest, force=force)
|
||||
func(None, model.id, force=force)
|
||||
|
||||
if not charts_only:
|
||||
compute_generic_thumbnail(
|
||||
|
||||
Reference in New Issue
Block a user