mirror of
https://github.com/apache/superset.git
synced 2026-04-20 00:24:38 +00:00
[deck_polygon] implement null locations flag (#5948)
* [deck_polygon] implement null locations flag * Fix unrelated JS test issue
This commit is contained in:
committed by
GitHub
parent
f94bda01b4
commit
a1fa4bc606
@@ -54,6 +54,5 @@ describe('TableElement', () => {
|
||||
wrapper.find('.table-remove').simulate('click');
|
||||
expect(wrapper.state().expanded).to.equal(false);
|
||||
expect(mockedActions.removeDataPreview.called).to.equal(true);
|
||||
expect(mockedActions.removeTable.called).to.equal(true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -712,16 +712,6 @@ export const controls = {
|
||||
}),
|
||||
},
|
||||
|
||||
polygon: {
|
||||
type: 'SelectControl',
|
||||
label: t('Polygon Column'),
|
||||
validators: [v.nonEmpty],
|
||||
description: t('Select the polygon column. Each row should contain JSON.array(N) of [longitude, latitude] points'),
|
||||
mapStateToProps: state => ({
|
||||
choices: (state.datasource) ? state.datasource.all_cols : [],
|
||||
}),
|
||||
},
|
||||
|
||||
point_radius_scale: {
|
||||
type: 'SelectControl',
|
||||
freeForm: true,
|
||||
|
||||
@@ -2135,13 +2135,18 @@ class BaseDeckGLViz(BaseViz):
|
||||
return df
|
||||
|
||||
def add_null_filters(self):
|
||||
fd = self.form_data
|
||||
spatial_columns = set()
|
||||
for key in self.spatial_control_keys:
|
||||
for column in self.get_spatial_columns(key):
|
||||
spatial_columns.add(column)
|
||||
|
||||
if self.form_data.get('adhoc_filters') is None:
|
||||
self.form_data['adhoc_filters'] = []
|
||||
if fd.get('adhoc_filters') is None:
|
||||
fd['adhoc_filters'] = []
|
||||
|
||||
line_column = fd.get('line_column')
|
||||
if line_column:
|
||||
spatial_columns.add(line_column)
|
||||
|
||||
for column in sorted(spatial_columns):
|
||||
filter_ = to_adhoc({
|
||||
@@ -2149,7 +2154,7 @@ class BaseDeckGLViz(BaseViz):
|
||||
'op': 'IS NOT NULL',
|
||||
'val': '',
|
||||
})
|
||||
self.form_data['adhoc_filters'].append(filter_)
|
||||
fd['adhoc_filters'].append(filter_)
|
||||
|
||||
def query_obj(self):
|
||||
fd = self.form_data
|
||||
|
||||
Reference in New Issue
Block a user