Skip to content

Commit

Permalink
fix(hex): restore control panel to functioning state (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro authored and zhaoyongjie committed Nov 30, 2021
1 parent d96f84b commit 55b3c79
Showing 1 changed file with 32 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,63 +17,64 @@
* 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: [
sections.legacyRegularTime,
{
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,
],
],
},
Expand Down

0 comments on commit 55b3c79

Please sign in to comment.