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
1 changed files with 32 additions and 31 deletions

View File

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