You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2018/08/06 15:36:13 UTC
[incubator-superset] branch master updated: A collection of small
bug fixes on master (#5561)
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new b7f9dab A collection of small bug fixes on master (#5561)
b7f9dab is described below
commit b7f9dabc44137fd62ccd29d5f24724eb162f0012
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Mon Aug 6 08:36:06 2018 -0700
A collection of small bug fixes on master (#5561)
---
.../assets/src/visualizations/deckgl/layers/grid.jsx | 1 -
superset/data/__init__.py | 19 ++++++++++---------
superset/legacy.py | 4 +++-
superset/views/core.py | 4 ++--
superset/viz.py | 3 +--
5 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/superset/assets/src/visualizations/deckgl/layers/grid.jsx b/superset/assets/src/visualizations/deckgl/layers/grid.jsx
index ca3056e..16a538c 100644
--- a/superset/assets/src/visualizations/deckgl/layers/grid.jsx
+++ b/superset/assets/src/visualizations/deckgl/layers/grid.jsx
@@ -21,7 +21,6 @@ function getLayer(formData, payload, slice) {
const jsFnMutator = sandboxedEval(fd.js_data_mutator);
data = jsFnMutator(data);
}
-
return new GridLayer({
id: `grid-layer-${fd.slice_id}`,
data,
diff --git a/superset/data/__init__.py b/superset/data/__init__.py
index b887034..a164111 100644
--- a/superset/data/__init__.py
+++ b/superset/data/__init__.py
@@ -226,6 +226,7 @@ def load_world_bank_health_n_pop():
params=get_slice_json(
defaults,
viz_type='filter_box',
+ date_filter=False,
groupby=['region', 'country_name'])),
Slice(
slice_name="World's Population",
@@ -472,7 +473,7 @@ def load_world_bank_health_n_pop():
"width": 4
},
"type": "CHART"
- },
+ },
"CHART-a4808bba": {
"children": [],
"id": "CHART-a4808bba",
@@ -994,7 +995,7 @@ def load_birth_names():
"type": "CHART",
"id": "CHART-976960a5",
"children": []
- },
+ },
"CHART-58575537": {
"meta": {
"chartId": 54,
@@ -1024,7 +1025,7 @@ def load_birth_names():
"type": "CHART",
"id": "CHART-e440d205",
"children": []
- },
+ },
"CHART-59444e0b": {
"meta": {
"chartId": 57,
@@ -1054,7 +1055,7 @@ def load_birth_names():
"type": "CHART",
"id": "CHART-e8774b49",
"children": []
- },
+ },
"CHART-985bfd1e": {
"meta": {
"chartId": 61,
@@ -1064,7 +1065,7 @@ def load_birth_names():
"type": "CHART",
"id": "CHART-985bfd1e",
"children": []
- },
+ },
"CHART-17f13246": {
"meta": {
"chartId": 62,
@@ -1331,7 +1332,7 @@ def load_unicode_test_data():
"type": "ROW"
},
"VERSION_KEY": "v2"
-}
+}
"""
dash.dashboard_title = "Unicode Test"
l = json.loads(js)
@@ -1836,6 +1837,7 @@ def load_deck_dash():
"multiplier": 10,
"point_radius_fixed": {"type": "metric", "value": "count"},
"point_unit": "square_m",
+ "min_radius": 1,
"row_limit": 5000,
"since": None,
"size": "count",
@@ -1972,10 +1974,9 @@ def load_deck_dash():
"granularity_sqla": "dttm",
"size": "count",
"viz_type": "deck_grid",
- "since": None,
"point_radius_unit": "Pixels",
"point_radius": "Auto",
- "until": None,
+ "time_range": "No filter",
"color_picker": {
"a": 1,
"r": 14,
@@ -2244,7 +2245,7 @@ def load_deck_dash():
"type": "CHART",
"id": "CHART-d02f6c40",
"children": []
- },
+ },
"CHART-2673431d": {
"meta": {
"chartId": 70,
diff --git a/superset/legacy.py b/superset/legacy.py
index 54da75c..49cc5fe 100644
--- a/superset/legacy.py
+++ b/superset/legacy.py
@@ -88,4 +88,6 @@ def update_time_range(form_data):
"""Move since and until to time_range."""
if 'since' in form_data or 'until' in form_data:
form_data['time_range'] = '{} : {}'.format(
- form_data.pop('since', ''), form_data.pop('until', ''))
+ form_data.pop('since', '') or '',
+ form_data.pop('until', '') or '',
+ )
diff --git a/superset/views/core.py b/superset/views/core.py
index 09904f7..14c5469 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -1075,7 +1075,7 @@ class Superset(BaseSupersetView):
json.dumps({
'query': query,
'language': viz_obj.datasource.query_language,
- 'data': viz_obj.get_df().to_dict('records'),
+ 'data': viz_obj.get_df().to_dict('records'), # TODO, split into endpoint
}, default=utils.json_iso_dttm_ser),
status=200,
mimetype='application/json')
@@ -2742,7 +2742,7 @@ class Superset(BaseSupersetView):
@api
@has_access_api
@expose('/slice_query/<slice_id>/')
- def sliceQuery(self, slice_id):
+ def slice_query(self, slice_id):
"""
This method exposes an API endpoint to
get the database query string for this slice
diff --git a/superset/viz.py b/superset/viz.py
index c9eea34..b0a71d5 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -2065,7 +2065,7 @@ class BaseDeckGLViz(BaseViz):
spatial_control_keys = []
def handle_nulls(self, df):
- pass
+ return df
def get_metrics(self):
self.metric = self.form_data.get('size')
@@ -2146,7 +2146,6 @@ class BaseDeckGLViz(BaseViz):
d['columns'] = []
else:
d['columns'] = gb
-
return d
def get_js_columns(self, d):