From 085de130ef30d08ff0c53453d3576b0592da5f16 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Mon, 20 Nov 2017 10:32:14 -0800 Subject: [PATCH] [bugfix] allow limiting word cloud (#3902) --- superset/assets/javascripts/explore/stores/controls.jsx | 2 ++ superset/assets/javascripts/explore/stores/visTypes.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/superset/assets/javascripts/explore/stores/controls.jsx b/superset/assets/javascripts/explore/stores/controls.jsx index eabd29fe77161..325c8786924e6 100644 --- a/superset/assets/javascripts/explore/stores/controls.jsx +++ b/superset/assets/javascripts/explore/stores/controls.jsx @@ -729,6 +729,7 @@ export const controls = { type: 'SelectControl', freeForm: true, label: t('Row limit'), + validators: [v.integer], default: null, choices: formatSelectOptions(ROW_LIMIT_OPTIONS), }, @@ -737,6 +738,7 @@ export const controls = { type: 'SelectControl', freeForm: true, label: t('Series limit'), + validators: [v.integer], choices: formatSelectOptions(SERIES_LIMITS), default: 50, description: t('Limits the number of time series that get displayed'), diff --git a/superset/assets/javascripts/explore/stores/visTypes.js b/superset/assets/javascripts/explore/stores/visTypes.js index b13d4a787e4b7..ef3100375b89c 100644 --- a/superset/assets/javascripts/explore/stores/visTypes.js +++ b/superset/assets/javascripts/explore/stores/visTypes.js @@ -610,7 +610,8 @@ export const visTypes = { label: t('Query'), expanded: true, controlSetRows: [ - ['series', 'metric', 'limit'], + ['series', 'metric'], + ['row_limit', null], ], }, {