chore: move controlPanel into time_table (#18160)

This commit is contained in:
Yongjie Zhao 2022-01-28 12:13:12 +08:00 committed by GitHub
parent 7c937ca182
commit ea2d6681dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 6 deletions

View File

@ -33,7 +33,7 @@ import {
EchartsTimeseriesChartPlugin,
} from '@superset-ui/plugin-chart-echarts';
import { LineChartPlugin } from '@superset-ui/preset-chart-xy';
import TimeTableChartPlugin from '../../../../visualizations/TimeTable/TimeTableChartPlugin';
import TimeTableChartPlugin from '../../../../visualizations/TimeTable';
import VizTypeControl, { VIZ_TYPE_CONTROL_TEST_ID } from './index';
jest.useFakeTimers();

View File

@ -21,15 +21,12 @@ import MainPreset from '../visualizations/presets/MainPreset';
import setupPluginsExtra from './setupPluginsExtra';
import Separator from '../explore/controlPanels/Separator';
import TimeTable from '../explore/controlPanels/TimeTable';
export default function setupPlugins() {
new MainPreset().register();
// TODO: Remove these shims once the control panel configs are moved into the plugin package.
getChartControlPanelRegistry()
.registerValue('separator', Separator)
.registerValue('time_table', TimeTable);
getChartControlPanelRegistry().registerValue('separator', Separator);
setupPluginsExtra();
}

View File

@ -19,6 +19,7 @@
import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
import transformProps from './transformProps';
import thumbnail from './images/thumbnail.png';
import controlPanel from './controlPanel';
const metadata = new ChartMetadata({
category: t('Table'),
@ -45,6 +46,7 @@ export default class TimeTableChartPlugin extends ChartPlugin {
metadata,
transformProps,
loadChart: () => import('./TimeTable'),
controlPanel,
});
}
}

View File

@ -79,7 +79,7 @@ import {
} from 'src/filters/components/';
import { PivotTableChartPlugin as PivotTableChartPluginV2 } from '@superset-ui/plugin-chart-pivot-table';
import FilterBoxChartPlugin from '../FilterBox/FilterBoxChartPlugin';
import TimeTableChartPlugin from '../TimeTable/TimeTableChartPlugin';
import TimeTableChartPlugin from '../TimeTable';
export default class MainPreset extends Preset {
constructor() {