From commits-return-1569-archive-asf-public=cust-asf.ponee.io@superset.incubator.apache.org Fri Sep 21 07:02:35 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 51199180656 for ; Fri, 21 Sep 2018 07:02:35 +0200 (CEST) Received: (qmail 22372 invoked by uid 500); 21 Sep 2018 05:02:34 -0000 Mailing-List: contact commits-help@superset.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@superset.incubator.apache.org Delivered-To: mailing list commits@superset.incubator.apache.org Received: (qmail 22363 invoked by uid 99); 21 Sep 2018 05:02:34 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Sep 2018 05:02:34 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 8DF1782DA2; Fri, 21 Sep 2018 05:02:33 +0000 (UTC) Date: Fri, 21 Sep 2018 05:02:33 +0000 To: "commits@superset.apache.org" Subject: [incubator-superset] branch master updated: [deck_polygon] implement null locations flag (#5948) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <153750615334.324.606511528534666524@gitbox.apache.org> From: maximebeauchemin@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-superset X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: f94bda01b43d0b50ca9297cb3facbc08ac7c132b X-Git-Newrev: a1fa4bc6061ed1063501a3d3b6ea91898821c4a4 X-Git-Rev: a1fa4bc6061ed1063501a3d3b6ea91898821c4a4 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated 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 a1fa4bc [deck_polygon] implement null locations flag (#5948) a1fa4bc is described below commit a1fa4bc6061ed1063501a3d3b6ea91898821c4a4 Author: Maxime Beauchemin AuthorDate: Thu Sep 20 22:02:28 2018 -0700 [deck_polygon] implement null locations flag (#5948) * [deck_polygon] implement null locations flag * Fix unrelated JS test issue --- superset/assets/spec/javascripts/sqllab/TableElement_spec.jsx | 1 - superset/assets/src/explore/controls.jsx | 10 ---------- superset/viz.py | 11 ++++++++--- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/superset/assets/spec/javascripts/sqllab/TableElement_spec.jsx b/superset/assets/spec/javascripts/sqllab/TableElement_spec.jsx index 69adf09..6d683d3 100644 --- a/superset/assets/spec/javascripts/sqllab/TableElement_spec.jsx +++ b/superset/assets/spec/javascripts/sqllab/TableElement_spec.jsx @@ -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); }); }); diff --git a/superset/assets/src/explore/controls.jsx b/superset/assets/src/explore/controls.jsx index 86ac9f5..15b0460 100644 --- a/superset/assets/src/explore/controls.jsx +++ b/superset/assets/src/explore/controls.jsx @@ -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, diff --git a/superset/viz.py b/superset/viz.py index 46cd158..a714546 100644 --- a/superset/viz.py +++ b/superset/viz.py @@ -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