mirror of
https://github.com/apache/superset.git
synced 2024-09-06 22:07:34 -04:00
refactor: remove slice level label_colors from dashboard init load (#10603)
This commit is contained in:
parent
a3ac5061fe
commit
3bc79191c4
@ -304,6 +304,7 @@ DEFAULT_FEATURE_FLAGS: Dict[str, bool] = {
|
||||
# Exposes API endpoint to compute thumbnails
|
||||
"THUMBNAILS": False,
|
||||
"REDUCE_DASHBOARD_BOOTSTRAP_PAYLOAD": True,
|
||||
"REMOVE_SLICE_LEVEL_LABEL_COLORS": False,
|
||||
"SHARE_QUERIES_VIA_KV_STORE": False,
|
||||
"SIP_38_VIZ_REARCHITECTURE": False,
|
||||
"TAGGING_SYSTEM": False,
|
||||
|
@ -1652,6 +1652,13 @@ class Superset(BaseSupersetView): # pylint: disable=too-many-public-methods
|
||||
)
|
||||
|
||||
dashboard_data = dash.data
|
||||
if is_feature_enabled("REMOVE_SLICE_LEVEL_LABEL_COLORS"):
|
||||
# dashboard metadata has dashboard-level label_colors,
|
||||
# so remove slice-level label_colors from its form_data
|
||||
for slc in dashboard_data.get("slices"):
|
||||
form_data = slc.get("form_data")
|
||||
form_data.pop("label_colors", None)
|
||||
|
||||
dashboard_data.update(
|
||||
{
|
||||
"standalone_mode": standalone_mode,
|
||||
|
Loading…
Reference in New Issue
Block a user