Skip to content

Commit

Permalink
remove un-used table vis types and options
Browse files Browse the repository at this point in the history
Signed-off-by: Anan Zhuang <[email protected]>
  • Loading branch information
ananzh committed Nov 2, 2022
1 parent a4fefe9 commit 09bf347
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 385 deletions.
2 changes: 1 addition & 1 deletion config/opensearch_dashboards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@

# Set the value of this setting to true to start exploring wizard
# functionality in Visualization.
# vis_builder.enabled: false
vis_builder.enabled: true

# Set the value of this setting to true to enable the experimental multiple data source
# support feature. Use with caution.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const toExpression = async ({ style: styleState, visualization }: TableRo

// Update buildExpressionFunction to correctly handle optional arguments
const tableVis = buildExpressionFunction<TableVisExpressionFunctionDefinition>(
'opensearch_dashboards_table_new',
'opensearch_dashboards_table',
{
visConfig: JSON.stringify(visConfig),
}
Expand Down
4 changes: 1 addition & 3 deletions src/plugins/vis_type_table_new/opensearch_dashboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
"requiredBundles": [
"opensearchDashboardsUtils",
"opensearchDashboardsReact",
"charts",
"share",
"visDefaultEditor"
"share"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export const TableVisApp = ({
visTable__groupInColumns: direction === 'column',
});

// TODO: remove duplicate sort and width state
// Issue: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2704#issuecomment-1299380818
const [sort, setSort] = useState<SortColumn>(
handlers.uiState.get('vis.sortColumn') || { colIndex: null, direction: null }
);
Expand Down
163 changes: 0 additions & 163 deletions src/plugins/vis_type_table_new/public/components/table_vis_options.tsx

This file was deleted.

This file was deleted.

7 changes: 1 addition & 6 deletions src/plugins/vis_type_table_new/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { Plugin as ExpressionsPublicPlugin } from '../../expressions/public';
import { VisualizationsSetup } from '../../visualizations/public';

import { createTableVisFn } from './table_vis_fn';
import { getNewTableVisTypeDefinition } from './table_vis_type';
import { DataPublicPluginStart } from '../../data/public';
import { setFormatService } from './services';
import { ConfigSchema } from '../config';
Expand All @@ -30,14 +29,10 @@ export interface TableVisPluginStartDependencies {
data: DataPublicPluginStart;
}

const setupTableVis = async (
core: CoreSetup,
{ expressions, visualizations }: TableVisPluginSetupDependencies
) => {
const setupTableVis = async (core: CoreSetup, { expressions }: TableVisPluginSetupDependencies) => {
const [coreStart] = await core.getStartServices();
expressions.registerFunction(createTableVisFn);
expressions.registerRenderer(getTableVisRenderer(coreStart));
visualizations.createBaseVisualization(getNewTableVisTypeDefinition());
};

/** @internal */
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/vis_type_table_new/public/table_vis_fn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ export interface TableVisRenderValue {
}

export type TableVisExpressionFunctionDefinition = ExpressionFunctionDefinition<
'opensearch_dashboards_table_new',
'opensearch_dashboards_table',
Input,
Arguments,
Render<TableVisRenderValue>
>;

export const createTableVisFn = (): TableVisExpressionFunctionDefinition => ({
name: 'opensearch_dashboards_table_new',
name: 'opensearch_dashboards_table',
type: 'render',
inputTypes: ['opensearch_dashboards_datatable'],
help: i18n.translate('visTypeTableNew.function.help', {
Expand Down
105 changes: 0 additions & 105 deletions src/plugins/vis_type_table_new/public/table_vis_type.ts

This file was deleted.

Loading

0 comments on commit 09bf347

Please sign in to comment.