fix(hex): restore control panel to functioning state (#42)

This commit is contained in:
Ville Brofeldt 2021-08-19 13:11:29 +03:00 committed by Yongjie Zhao
parent d96f84bb0a
commit 55b3c7933d

View File

@ -17,28 +17,21 @@
* under the License. * under the License.
*/ */
import { sections } from '@superset-ui/chart-controls'; import { sections } from '@superset-ui/chart-controls';
import { t, legacyValidateInteger, isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; import { t } from '@superset-ui/core';
import { formatSelectOptions } from '../../utilities/utils'; import { formatSelectOptions } from '../../utilities/utils';
import { import {
autozoom,
extruded,
filterNulls, filterNulls,
gridSize,
jsColumns, jsColumns,
jsDataMutator, jsDataMutator,
jsTooltip,
jsOnclickHref, jsOnclickHref,
fillColorPicker, jsTooltip,
strokeColorPicker,
filled,
stroked,
extruded,
viewport,
mapboxStyle, mapboxStyle,
geojsonColumn, spatial,
viewport,
} from '../../utilities/Shared_DeckGL'; } from '../../utilities/Shared_DeckGL';
import { dndGeojsonColumn } from '../../utilities/sharedDndControls';
const geojson = isFeatureEnabled(FeatureFlag.ENABLE_EXPLORE_DRAG_AND_DROP)
? dndGeojsonColumn
: geojsonColumn;
export default { export default {
controlPanelSections: [ controlPanelSections: [
@ -46,34 +39,42 @@ export default {
{ {
label: t('Query'), label: t('Query'),
expanded: true, expanded: true,
controlSetRows: [[geojson], ['row_limit'], [filterNulls], ['adhoc_filters']], controlSetRows: [[spatial], ['size'], ['row_limit'], [filterNulls], ['adhoc_filters']],
}, },
{ {
label: t('Map'), label: t('Map'),
controlSetRows: [ controlSetRows: [
[mapboxStyle, viewport], [mapboxStyle, viewport],
// TODO [autozoom, null], // import { autozoom } from './Shared_DeckGL' ['color_picker'],
], [autozoom],
}, [gridSize],
{ [extruded],
label: t('GeoJson Settings'),
controlSetRows: [
[fillColorPicker, strokeColorPicker],
[filled, stroked],
[extruded, null],
[ [
{ {
name: 'point_radius_scale', name: 'js_agg_function',
config: { config: {
type: 'SelectControl', type: 'SelectControl',
freeForm: true, label: t('Dynamic Aggregation Function'),
label: t('Point Radius Scale'), description: t('The function to use when aggregating points into groups'),
validators: [legacyValidateInteger], default: 'sum',
default: null, clearable: false,
choices: formatSelectOptions([0, 100, 200, 300, 500]), renderTrigger: true,
choices: formatSelectOptions([
'sum',
'min',
'max',
'mean',
'median',
'count',
'variance',
'deviation',
'p1',
'p5',
'p95',
'p99',
]),
}, },
}, },
null,
], ],
], ],
}, },