A collection of small bug fixes on master (#5561)

This commit is contained in:
Maxime Beauchemin 2018-08-06 08:36:06 -07:00 committed by GitHub
parent f5ad661441
commit b7f9dabc44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 15 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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 '',
)

View File

@ -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

View File

@ -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):