mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
Refactor Dashboard and Slice models (#8820)
* refactor dashboard and slice models * appease various linters * remove shortcuts & import indirection * appease mypy * fix bad imports * lint * address various issues * ignore type issue * remove unused imports * lint
This commit is contained in:
committed by
Maxime Beauchemin
parent
cbf860074b
commit
016f202423
@@ -18,8 +18,10 @@
|
||||
import json
|
||||
|
||||
from superset import db
|
||||
from superset.models.dashboard import Dashboard
|
||||
from superset.models.slice import Slice
|
||||
|
||||
from .helpers import Dash, get_slice_json, merge_slice, Slice, TBL, update_slice_ids
|
||||
from .helpers import get_slice_json, merge_slice, TBL, update_slice_ids
|
||||
|
||||
COLOR_RED = {"r": 205, "g": 0, "b": 3, "a": 0.82}
|
||||
POSITION_JSON = """\
|
||||
@@ -509,10 +511,10 @@ def load_deck_dash():
|
||||
|
||||
print("Creating a dashboard")
|
||||
title = "deck.gl Demo"
|
||||
dash = db.session.query(Dash).filter_by(slug=slug).first()
|
||||
dash = db.session.query(Dashboard).filter_by(slug=slug).first()
|
||||
|
||||
if not dash:
|
||||
dash = Dash()
|
||||
dash = Dashboard()
|
||||
dash.published = True
|
||||
js = POSITION_JSON
|
||||
pos = json.loads(js)
|
||||
|
||||
Reference in New Issue
Block a user