Skip to content

Commit

Permalink
chore: move controlPanel into time_table (#18160)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongjie authored Jan 28, 2022
1 parent 7c937ca commit ea2d668
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
5 changes: 1 addition & 4 deletions superset-frontend/src/setup/setupPlugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand All @@ -45,6 +46,7 @@ export default class TimeTableChartPlugin extends ChartPlugin {
metadata,
transformProps,
loadChart: () => import('./TimeTable'),
controlPanel,
});
}
}
2 changes: 1 addition & 1 deletion superset-frontend/src/visualizations/presets/MainPreset.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit ea2d668

Please sign in to comment.