chore(chart-data): add annotations and url params to chart data schema (#11393)

* chore(chart-data): add annotations to chart data schema

* bump superset-ui packages

* xit flaky cypress tests
This commit is contained in:
Ville Brofeldt
2020-10-28 23:41:39 +02:00
committed by GitHub
parent e5e35634de
commit e230865216
6 changed files with 695 additions and 251 deletions

View File

@@ -59,6 +59,7 @@ class QueryObject:
and druid. The query objects are constructed on the client.
"""
annotation_layers: List[Dict[str, Any]]
granularity: Optional[str]
from_dttm: Optional[datetime]
to_dttm: Optional[datetime]
@@ -79,6 +80,7 @@ class QueryObject:
def __init__(
self,
annotation_layers: Optional[List[Dict[str, Any]]] = None,
granularity: Optional[str] = None,
metrics: Optional[List[Union[Dict[str, Any], str]]] = None,
groupby: Optional[List[str]] = None,
@@ -97,9 +99,11 @@ class QueryObject:
post_processing: Optional[List[Optional[Dict[str, Any]]]] = None,
**kwargs: Any,
):
annotation_layers = annotation_layers or []
metrics = metrics or []
extras = extras or {}
is_sip_38 = is_feature_enabled("SIP_38_VIZ_REARCHITECTURE")
self.annotation_layers = annotation_layers
self.granularity = granularity
self.from_dttm, self.to_dttm = utils.get_since_until(
relative_start=extras.get(