mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
feat: improve docker-compose services boot sequence (#31747)
This commit is contained in:
committed by
GitHub
parent
5f18e849c1
commit
7bd53a84d5
@@ -15,6 +15,8 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import logging
|
||||
|
||||
from superset import db
|
||||
from superset.models.dashboard import Dashboard
|
||||
from superset.models.slice import Slice
|
||||
@@ -28,6 +30,8 @@ from .helpers import (
|
||||
update_slice_ids,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
COLOR_RED = {"r": 205, "g": 0, "b": 3, "a": 0.82}
|
||||
POSITION_JSON = """\
|
||||
{
|
||||
@@ -180,7 +184,7 @@ POSITION_JSON = """\
|
||||
|
||||
|
||||
def load_deck_dash() -> None: # pylint: disable=too-many-statements
|
||||
print("Loading deck.gl dashboard")
|
||||
logger.debug("Loading deck.gl dashboard")
|
||||
slices = []
|
||||
table = get_table_connector_registry()
|
||||
tbl = db.session.query(table).filter_by(table_name="long_lat").first()
|
||||
@@ -210,7 +214,7 @@ def load_deck_dash() -> None: # pylint: disable=too-many-statements
|
||||
"viz_type": "deck_scatter",
|
||||
}
|
||||
|
||||
print("Creating Scatterplot slice")
|
||||
logger.debug("Creating Scatterplot slice")
|
||||
slc = Slice(
|
||||
slice_name="Deck.gl Scatterplot",
|
||||
viz_type="deck_scatter",
|
||||
@@ -245,7 +249,7 @@ def load_deck_dash() -> None: # pylint: disable=too-many-statements
|
||||
"time_grain_sqla": None,
|
||||
"groupby": [],
|
||||
}
|
||||
print("Creating Screen Grid slice")
|
||||
logger.debug("Creating Screen Grid slice")
|
||||
slc = Slice(
|
||||
slice_name="Deck.gl Screen grid",
|
||||
viz_type="deck_screengrid",
|
||||
@@ -281,7 +285,7 @@ def load_deck_dash() -> None: # pylint: disable=too-many-statements
|
||||
"time_grain_sqla": None,
|
||||
"groupby": [],
|
||||
}
|
||||
print("Creating Hex slice")
|
||||
logger.debug("Creating Hex slice")
|
||||
slc = Slice(
|
||||
slice_name="Deck.gl Hexagons",
|
||||
viz_type="deck_hex",
|
||||
@@ -318,7 +322,7 @@ def load_deck_dash() -> None: # pylint: disable=too-many-statements
|
||||
"time_grain_sqla": None,
|
||||
"groupby": [],
|
||||
}
|
||||
print("Creating Grid slice")
|
||||
logger.debug("Creating Grid slice")
|
||||
slc = Slice(
|
||||
slice_name="Deck.gl Grid",
|
||||
viz_type="deck_grid",
|
||||
@@ -409,7 +413,7 @@ def load_deck_dash() -> None: # pylint: disable=too-many-statements
|
||||
"legend_position": "tr",
|
||||
}
|
||||
|
||||
print("Creating Polygon slice")
|
||||
logger.debug("Creating Polygon slice")
|
||||
slc = Slice(
|
||||
slice_name="Deck.gl Polygons",
|
||||
viz_type="deck_polygon",
|
||||
@@ -459,7 +463,7 @@ def load_deck_dash() -> None: # pylint: disable=too-many-statements
|
||||
"stroke_width": 1,
|
||||
}
|
||||
|
||||
print("Creating Arc slice")
|
||||
logger.debug("Creating Arc slice")
|
||||
slc = Slice(
|
||||
slice_name="Deck.gl Arcs",
|
||||
viz_type="deck_arc",
|
||||
@@ -511,7 +515,7 @@ def load_deck_dash() -> None: # pylint: disable=too-many-statements
|
||||
"js_onclick_href": "",
|
||||
}
|
||||
|
||||
print("Creating Path slice")
|
||||
logger.debug("Creating Path slice")
|
||||
slc = Slice(
|
||||
slice_name="Deck.gl Path",
|
||||
viz_type="deck_path",
|
||||
@@ -526,7 +530,7 @@ def load_deck_dash() -> None: # pylint: disable=too-many-statements
|
||||
slices.append(slc)
|
||||
slug = "deck"
|
||||
|
||||
print("Creating a dashboard")
|
||||
logger.debug("Creating a dashboard")
|
||||
title = "deck.gl Demo"
|
||||
dash = db.session.query(Dashboard).filter_by(slug=slug).first()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user