From 8974609641ef217bc664d1b80a35b3946776f3f3 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Wed, 4 Sep 2019 09:26:36 -0700 Subject: [PATCH 1/5] update Kepler viz transformProps for latest superset-ui --- superset/assets/src/visualizations/Kepler/transformProps.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/superset/assets/src/visualizations/Kepler/transformProps.js b/superset/assets/src/visualizations/Kepler/transformProps.js index ed645c018ae73..24f648ad1aba2 100644 --- a/superset/assets/src/visualizations/Kepler/transformProps.js +++ b/superset/assets/src/visualizations/Kepler/transformProps.js @@ -17,8 +17,8 @@ * under the License. */ export default function transformProps(chartProps) { - const { formData, height, width, payload, setControlValue } = chartProps; - const { mapboxApiAccessToken, features } = payload.data; + const { formData, height, width, queryData, setControlValue } = chartProps; + const { mapboxApiAccessToken, features } = queryData.data; const { config, autozoom, readonly } = formData; return { height, From dc2fe01ad1ca40e427ad11018c9ae046e90e4226 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Wed, 4 Sep 2019 09:36:48 -0700 Subject: [PATCH 2/5] fix setControlValue --- .../assets/src/visualizations/Kepler/transformProps.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/superset/assets/src/visualizations/Kepler/transformProps.js b/superset/assets/src/visualizations/Kepler/transformProps.js index 24f648ad1aba2..8415361c21ebb 100644 --- a/superset/assets/src/visualizations/Kepler/transformProps.js +++ b/superset/assets/src/visualizations/Kepler/transformProps.js @@ -17,9 +17,16 @@ * under the License. */ export default function transformProps(chartProps) { - const { formData, height, width, queryData, setControlValue } = chartProps; + const { + formData, + height, + width, + queryData, + hooks, + } = chartProps; const { mapboxApiAccessToken, features } = queryData.data; const { config, autozoom, readonly } = formData; + const { onAddFilter = NOOP, setControlValue = NOOP, setTooltip = NOOP } = hooks; return { height, width, From 013222c433b479b04f35af0d34ceaefca9306613 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Wed, 4 Sep 2019 09:58:07 -0700 Subject: [PATCH 3/5] fix linter issues --- superset/assets/src/visualizations/Kepler/transformProps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset/assets/src/visualizations/Kepler/transformProps.js b/superset/assets/src/visualizations/Kepler/transformProps.js index 8415361c21ebb..1eeaa7aa00ab6 100644 --- a/superset/assets/src/visualizations/Kepler/transformProps.js +++ b/superset/assets/src/visualizations/Kepler/transformProps.js @@ -26,7 +26,7 @@ export default function transformProps(chartProps) { } = chartProps; const { mapboxApiAccessToken, features } = queryData.data; const { config, autozoom, readonly } = formData; - const { onAddFilter = NOOP, setControlValue = NOOP, setTooltip = NOOP } = hooks; + const { setControlValue = NOOP } = hooks; return { height, width, From 710e5ce4ec8d369973f695d4daac35b0888d45f3 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Wed, 4 Sep 2019 11:19:58 -0700 Subject: [PATCH 4/5] define NOOP for linter --- superset/assets/src/visualizations/Kepler/transformProps.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/superset/assets/src/visualizations/Kepler/transformProps.js b/superset/assets/src/visualizations/Kepler/transformProps.js index 1eeaa7aa00ab6..b241991f3b143 100644 --- a/superset/assets/src/visualizations/Kepler/transformProps.js +++ b/superset/assets/src/visualizations/Kepler/transformProps.js @@ -16,6 +16,8 @@ * specific language governing permissions and limitations * under the License. */ +const NOOP = () => {} + export default function transformProps(chartProps) { const { formData, From 52e984ffbbad67563bc7c2e333786c54e94dc392 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Wed, 4 Sep 2019 15:46:56 -0700 Subject: [PATCH 5/5] add missing semicolon --- superset/assets/src/visualizations/Kepler/transformProps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset/assets/src/visualizations/Kepler/transformProps.js b/superset/assets/src/visualizations/Kepler/transformProps.js index b241991f3b143..9e2e41bf2e627 100644 --- a/superset/assets/src/visualizations/Kepler/transformProps.js +++ b/superset/assets/src/visualizations/Kepler/transformProps.js @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -const NOOP = () => {} +const NOOP = () => {}; export default function transformProps(chartProps) { const {