diff --git a/package.json b/package.json index b3556960b..27c152ba3 100644 --- a/package.json +++ b/package.json @@ -21,13 +21,11 @@ ] }, "dependencies": { - "@ag-grid-community/styles": "^31.3.4", "@algolia/autocomplete-core": "^1.4.1", "@algolia/autocomplete-theme-classic": "^1.2.1", "@nteract/outputs": "^3.0.11", "@nteract/presentational-components": "^3.4.3", "@reduxjs/toolkit": "^1.6.1", - "ag-grid-react": "^31.3.4", "ajv": "^8.11.0", "antlr4": "4.8.0", "antlr4ts": "^0.5.0-alpha.4", diff --git a/public/components/event_analytics/explorer/visualizations/workspace_panel/workspace_panel.tsx b/public/components/event_analytics/explorer/visualizations/workspace_panel/workspace_panel.tsx index 958e745aa..6aa968f80 100644 --- a/public/components/event_analytics/explorer/visualizations/workspace_panel/workspace_panel.tsx +++ b/public/components/event_analytics/explorer/visualizations/workspace_panel/workspace_panel.tsx @@ -26,21 +26,6 @@ export function WorkspacePanel({ visualizations }: IWorkSpacePanel) { return (
- - { - setIsTableViewOn((staleState) => !staleState); - }} - aria-describedby="table view switcher" - data-test-subj="workspace__dataTableViewSwitch" - compressed - /> - - - -`; diff --git a/public/components/visualizations/charts/__tests__/data_table.test.tsx b/public/components/visualizations/charts/__tests__/data_table.test.tsx deleted file mode 100644 index 216a3fa29..000000000 --- a/public/components/visualizations/charts/__tests__/data_table.test.tsx +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import { configure, mount, shallow } from 'enzyme'; -import Adapter from 'enzyme-adapter-react-16'; -import React from 'react'; -import { waitFor } from '@testing-library/react'; -import { DataTable } from '../data_table/data_table'; -import { TEST_VISUALIZATIONS_DATA } from '../../../../../test/event_analytics_constants'; -import { AgGridReact } from 'ag-grid-react'; - -describe('Data table component', () => { - configure({ adapter: new Adapter() }); - - it('Renders data table component', async () => { - const gridWrapper = shallow(); - const agGridReactObj = gridWrapper.find(AgGridReact); - agGridReactObj.simulate('gridReady'); - expect(agGridReactObj).toBeTruthy(); - await waitFor(() => { - expect(gridWrapper).toMatchSnapshot(); - }); - }); -}); diff --git a/public/components/visualizations/charts/data_table/data_table.tsx b/public/components/visualizations/charts/data_table/data_table.tsx index 232339790..e0af6a7d2 100644 --- a/public/components/visualizations/charts/data_table/data_table.tsx +++ b/public/components/visualizations/charts/data_table/data_table.tsx @@ -6,11 +6,6 @@ import React, { useState, useMemo, useCallback, useRef, useEffect } from 'react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -// ag-data-grid -import { AgGridReact } from 'ag-grid-react'; -import '@ag-grid-community/styles/ag-grid.css'; -import '@ag-grid-community/styles/ag-theme-alpine.css'; - // grid elements import { CustomOverlay, RowConfigType, GridHeader } from './data_table_header'; import { GridFooter } from './data_table_footer'; @@ -196,22 +191,6 @@ export const DataTable = ({ visualizations, layout, config }: any) => { columnVisibility={columnVisibility} /> )} - { - gridRef?.current?.api.setHeaderHeight(HEADER_HEIGHT); - }} - suppressFieldDotNotation // added for key contains dot operator - /> {enablePagination && ( { - { - gridRefFullScreen?.current?.api.setHeaderHeight(HEADER_HEIGHT); - }} - // added for key contains dot operator - suppressFieldDotNotation - />