mirror of
https://github.com/apache/superset.git
synced 2024-09-12 16:49:40 -04:00
fix: Removes filter plugins from viz gallery (#27763)
This commit is contained in:
parent
bb5c0b4086
commit
b8e556d6f2
@ -189,3 +189,11 @@ export const DEFAULT_COMMON_BOOTSTRAP_DATA: CommonBootstrapData = {
|
||||
export const DEFAULT_BOOTSTRAP_DATA: BootstrapData = {
|
||||
common: DEFAULT_COMMON_BOOTSTRAP_DATA,
|
||||
};
|
||||
|
||||
export enum FilterPlugins {
|
||||
Select = 'filter_select',
|
||||
Range = 'filter_range',
|
||||
Time = 'filter_time',
|
||||
TimeColumn = 'filter_timecolumn',
|
||||
TimeGrain = 'filter_timegrain',
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ import { usePluginContext } from 'src/components/DynamicPlugins';
|
||||
import Modal from 'src/components/Modal';
|
||||
import { noOp } from 'src/utils/common';
|
||||
import getBootstrapData from 'src/utils/getBootstrapData';
|
||||
import { FilterPlugins } from 'src/constants';
|
||||
import VizTypeGallery, {
|
||||
MAX_ADVISABLE_VIZ_GALLERY_WIDTH,
|
||||
} from './VizTypeGallery';
|
||||
@ -43,7 +44,9 @@ interface VizTypeControlProps {
|
||||
}
|
||||
|
||||
const bootstrapData = getBootstrapData();
|
||||
const denyList: string[] = bootstrapData.common.conf.VIZ_TYPE_DENYLIST || [];
|
||||
const denyList: string[] = (
|
||||
bootstrapData.common.conf.VIZ_TYPE_DENYLIST || []
|
||||
).concat(Object.values(FilterPlugins));
|
||||
const metadataRegistry = getChartMetadataRegistry();
|
||||
|
||||
export const VIZ_TYPE_CONTROL_TEST_ID = 'viz-type-control';
|
||||
|
@ -27,7 +27,7 @@ import {
|
||||
t,
|
||||
} from '@superset-ui/core';
|
||||
import { getUrlParam } from 'src/utils/urlUtils';
|
||||
import { URL_PARAMS } from 'src/constants';
|
||||
import { FilterPlugins, URL_PARAMS } from 'src/constants';
|
||||
import { Link, withRouter, RouteComponentProps } from 'react-router-dom';
|
||||
import Button from 'src/components/Button';
|
||||
import { AsyncSelect, Steps } from 'src/components';
|
||||
@ -60,7 +60,9 @@ const ESTIMATED_NAV_HEIGHT = 56;
|
||||
const ELEMENTS_EXCEPT_VIZ_GALLERY = ESTIMATED_NAV_HEIGHT + 250;
|
||||
|
||||
const bootstrapData = getBootstrapData();
|
||||
const denyList: string[] = bootstrapData.common.conf.VIZ_TYPE_DENYLIST || [];
|
||||
const denyList: string[] = (
|
||||
bootstrapData.common.conf.VIZ_TYPE_DENYLIST || []
|
||||
).concat(Object.values(FilterPlugins));
|
||||
|
||||
const StyledContainer = styled.div`
|
||||
${({ theme }) => `
|
||||
|
@ -77,6 +77,7 @@ import {
|
||||
import { PivotTableChartPlugin as PivotTableChartPluginV2 } from '@superset-ui/plugin-chart-pivot-table';
|
||||
import { HandlebarsChartPlugin } from '@superset-ui/plugin-chart-handlebars';
|
||||
import { PopKPIPlugin } from '@superset-ui/plugin-chart-period-over-period-kpi';
|
||||
import { FilterPlugins } from 'src/constants';
|
||||
import TimeTableChartPlugin from '../TimeTable';
|
||||
|
||||
export default class MainPreset extends Preset {
|
||||
@ -153,11 +154,15 @@ export default class MainPreset extends Preset {
|
||||
new EchartsWaterfallChartPlugin().configure({
|
||||
key: 'waterfall',
|
||||
}),
|
||||
new SelectFilterPlugin().configure({ key: 'filter_select' }),
|
||||
new RangeFilterPlugin().configure({ key: 'filter_range' }),
|
||||
new TimeFilterPlugin().configure({ key: 'filter_time' }),
|
||||
new TimeColumnFilterPlugin().configure({ key: 'filter_timecolumn' }),
|
||||
new TimeGrainFilterPlugin().configure({ key: 'filter_timegrain' }),
|
||||
new SelectFilterPlugin().configure({ key: FilterPlugins.Select }),
|
||||
new RangeFilterPlugin().configure({ key: FilterPlugins.Range }),
|
||||
new TimeFilterPlugin().configure({ key: FilterPlugins.Time }),
|
||||
new TimeColumnFilterPlugin().configure({
|
||||
key: FilterPlugins.TimeColumn,
|
||||
}),
|
||||
new TimeGrainFilterPlugin().configure({
|
||||
key: FilterPlugins.TimeGrain,
|
||||
}),
|
||||
new EchartsTreeChartPlugin().configure({ key: 'tree_chart' }),
|
||||
new EchartsSunburstChartPlugin().configure({ key: 'sunburst_v2' }),
|
||||
new HandlebarsChartPlugin().configure({ key: 'handlebars' }),
|
||||
|
Loading…
Reference in New Issue
Block a user