From 3bc44b62a2aed5cc4fe7bae3ce9e74113065ada0 Mon Sep 17 00:00:00 2001 From: "Anirudha (Ani) Jadhav" Date: Thu, 29 Jun 2023 17:40:54 -0700 Subject: [PATCH] Merge pull request #588 from mengweieric/feature/prerelease-code-cleanup (cherry picked from commit a85b716f4069e70cd2736e0fab7ec32a89907f8d) --- .../__snapshots__/utils.test.tsx.snap | 9 - .../__snapshots__/config_panel.test.tsx.snap | 846 +++++++++++++++++- .../shared_components.test.tsx.snap | 90 -- .../__tests__/shared_components.test.tsx | 12 - .../plotly_viz_editor/index.tsx | 1 + .../visualization_specs/default_spec.ts | 2 - .../__snapshots__/assets.test.tsx.snap | 64 -- .../assets/__tests__/assets.test.tsx | 56 -- .../visualizations/assets/chart_bar.tsx | 29 - .../assets/chart_bar_horizontal.tsx | 33 - .../visualizations/assets/chart_datatable.tsx | 35 - .../visualizations/assets/chart_line.tsx | 29 - .../visualizations/assets/chart_pie.tsx | 31 - .../__tests__/__snapshots__/bar.test.tsx.snap | 1 - .../__snapshots__/gauge.test.tsx.snap | 1 - .../__snapshots__/heatmap.test.tsx.snap | 1 - .../__snapshots__/histogram.test.tsx.snap | 1 - .../horizontal_bar.test.tsx.snap | 1 - .../__snapshots__/line.test.tsx.snap | 1 - .../__snapshots__/metrics.test.tsx.snap | 1 - .../__tests__/__snapshots__/pie.test.tsx.snap | 1 - .../__snapshots__/text.test.tsx.snap | 1 - .../__snapshots__/treemap.test.tsx.snap | 1 - .../visualizations/charts/bar/bar_type.ts | 2 - .../charts/bubble/bubble_type.ts | 2 - .../charts/data_table/data_table_type.ts | 4 - .../charts/financial/gauge/gauge_type.ts | 2 - .../visualizations/charts/lines/line_type.ts | 4 - .../visualizations/charts/maps/heatmap.tsx | 1 - .../charts/maps/heatmap_type.ts | 4 - .../charts/maps/treemap_type.ts | 6 +- .../charts/metrics/metrics_type.ts | 3 - .../visualizations/charts/pie/pie_type.ts | 5 - .../visualizations/charts/text/text_type.ts | 2 - 34 files changed, 827 insertions(+), 455 deletions(-) delete mode 100644 public/components/visualizations/assets/__tests__/__snapshots__/assets.test.tsx.snap delete mode 100644 public/components/visualizations/assets/__tests__/assets.test.tsx delete mode 100644 public/components/visualizations/assets/chart_bar.tsx delete mode 100644 public/components/visualizations/assets/chart_bar_horizontal.tsx delete mode 100644 public/components/visualizations/assets/chart_datatable.tsx delete mode 100644 public/components/visualizations/assets/chart_line.tsx delete mode 100644 public/components/visualizations/assets/chart_pie.tsx diff --git a/public/components/custom_panels/helpers/__tests__/__snapshots__/utils.test.tsx.snap b/public/components/custom_panels/helpers/__tests__/__snapshots__/utils.test.tsx.snap index 67e2f44365..6c4bc88924 100644 --- a/public/components/custom_panels/helpers/__tests__/__snapshots__/utils.test.tsx.snap +++ b/public/components/custom_panels/helpers/__tests__/__snapshots__/utils.test.tsx.snap @@ -418,7 +418,6 @@ exports[`Utils helper functions renders displayVisualization function 1`] = ` "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarVerticalStacked", "id": "bar", "label": "Vertical bar", @@ -876,7 +875,6 @@ exports[`Utils helper functions renders displayVisualization function 1`] = ` "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarVerticalStacked", "id": "bar", "label": "Vertical bar", @@ -1341,7 +1339,6 @@ exports[`Utils helper functions renders displayVisualization function 1`] = ` "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarVerticalStacked", "id": "bar", "label": "Vertical bar", @@ -2051,7 +2048,6 @@ exports[`Utils helper functions renders displayVisualization function 2`] = ` ], }, "fulllabel": "Time series", - "icon": [Function], "icontype": "visLine", "id": "line", "label": "Time series", @@ -2577,7 +2573,6 @@ exports[`Utils helper functions renders displayVisualization function 2`] = ` ], }, "fulllabel": "Time series", - "icon": [Function], "icontype": "visLine", "id": "line", "label": "Time series", @@ -3117,7 +3112,6 @@ exports[`Utils helper functions renders displayVisualization function 2`] = ` ], }, "fulllabel": "Time series", - "icon": [Function], "icontype": "visLine", "id": "line", "label": "Time series", @@ -3802,7 +3796,6 @@ exports[`Utils helper functions renders displayVisualization function 3`] = ` "fillopacity": 70, "fulllabel": "Horizontal bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarHorizontalStacked", "id": "horizontal_bar", "label": "Horizontal bar", @@ -4260,7 +4253,6 @@ exports[`Utils helper functions renders displayVisualization function 3`] = ` "fillopacity": 70, "fulllabel": "Horizontal bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarHorizontalStacked", "id": "horizontal_bar", "label": "Horizontal bar", @@ -4725,7 +4717,6 @@ exports[`Utils helper functions renders displayVisualization function 3`] = ` "fillopacity": 70, "fulllabel": "Horizontal bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarHorizontalStacked", "id": "horizontal_bar", "label": "Horizontal bar", diff --git a/public/components/event_analytics/explorer/visualizations/config_panel/__tests__/__snapshots__/config_panel.test.tsx.snap b/public/components/event_analytics/explorer/visualizations/config_panel/__tests__/__snapshots__/config_panel.test.tsx.snap index b753a6e2ab..0ea15c484a 100644 --- a/public/components/event_analytics/explorer/visualizations/config_panel/__tests__/__snapshots__/config_panel.test.tsx.snap +++ b/public/components/event_analytics/explorer/visualizations/config_panel/__tests__/__snapshots__/config_panel.test.tsx.snap @@ -465,7 +465,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarVerticalStacked", "id": "bar", "label": "Vertical bar", @@ -781,7 +780,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "iconType": "visBarVerticalStacked", "icontype": "visBarVerticalStacked", "id": "bar", @@ -1080,7 +1078,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] "fillopacity": 70, "fulllabel": "Horizontal bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarHorizontalStacked", "id": "horizontal_bar", "label": "Horizontal bar", @@ -1408,7 +1405,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] ], }, "fulllabel": "Time series", - "icon": [Function], "icontype": "visLine", "id": "line", "label": "Time series", @@ -1649,7 +1645,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] ], }, "fulllabel": "Pie", - "icon": [Function], "icontype": "visPie", "id": "pie", "label": "Pie", @@ -2089,7 +2084,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] ], }, "fulllabel": "Hubble", - "icon": [Function], "icontype": "heatmap", "id": "heatmap", "label": "Heatmap", @@ -2142,7 +2136,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] ], }, "fulllabel": "Markdown", - "icon": [Function], "icontype": "visText", "id": "text", "label": "Markdown", @@ -2470,7 +2463,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "iconType": "visBarVerticalStacked", "icontype": "visBarVerticalStacked", "id": "bar", @@ -2801,7 +2793,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "iconType": "visBarVerticalStacked", "icontype": "visBarVerticalStacked", "id": "bar", @@ -3138,7 +3129,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] fillopacity={70} fulllabel="Vertical bar" groupwidth={0.7} - icon={[Function]} iconType="visBarVerticalStacked" icontype="visBarVerticalStacked" id="bar" @@ -3408,7 +3398,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "iconType": "visBarVerticalStacked", "icontype": "visBarVerticalStacked", "id": "bar", @@ -3746,7 +3735,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] fillopacity={70} fulllabel="Vertical bar" groupwidth={0.7} - icon={[Function]} iconType="visBarVerticalStacked" icontype="visBarVerticalStacked" id="bar" @@ -4053,7 +4041,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] fillopacity={70} fulllabel="Vertical bar" groupwidth={0.7} - icon={[Function]} icontype="visBarVerticalStacked" id="bar" labelangle={0} @@ -4978,7 +4965,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarVerticalStacked", "id": "bar", "label": "Vertical bar", @@ -5755,7 +5741,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarVerticalStacked", "id": "bar", "label": "Vertical bar", @@ -6573,7 +6558,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarVerticalStacked", "id": "bar", "label": "Vertical bar", @@ -7126,7 +7110,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarVerticalStacked", "id": "bar", "label": "Vertical bar", @@ -7946,7 +7929,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarVerticalStacked", "id": "bar", "label": "Vertical bar", @@ -9265,7 +9247,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarVerticalStacked", "id": "bar", "label": "Vertical bar", @@ -10605,7 +10586,6 @@ exports[`Config panel component Renders config panel with visualization data 1`] "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarVerticalStacked", "id": "bar", "label": "Vertical bar", @@ -13021,7 +13001,831 @@ exports[`Config panel component Renders config panel with visualization data 1`] - + + + + + +
+
+ + +
+
+ +
+
+ +
+
+ + + + + + +
+ +
+
+ +
+
+ +
diff --git a/public/components/event_analytics/explorer/visualizations/shared_components/__tests__/__snapshots__/shared_components.test.tsx.snap b/public/components/event_analytics/explorer/visualizations/shared_components/__tests__/__snapshots__/shared_components.test.tsx.snap index f409c4a8d0..52c143da64 100644 --- a/public/components/event_analytics/explorer/visualizations/shared_components/__tests__/__snapshots__/shared_components.test.tsx.snap +++ b/public/components/event_analytics/explorer/visualizations/shared_components/__tests__/__snapshots__/shared_components.test.tsx.snap @@ -1,95 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Shared components Renders empty placeholder component 1`] = ` - - -
- -
- -
- - - - - - - - - -
- -

- - - No data found - - -

-
- -
- -
- - -`; - exports[`Shared components Renders tool bar button component 1`] = ` { configure({ adapter: new Adapter() }); - it('Renders empty placeholder component', async () => { - const wrapper = mount(); - - wrapper.update(); - - await waitFor(() => { - expect(wrapper).toMatchSnapshot(); - }); - }); - it('Renders tool bar button component', async () => { const handleClick = jest.fn(); const WrappedComponent = () =>
testing
; diff --git a/public/components/event_analytics/explorer/visualizations/shared_components/plotly_viz_editor/index.tsx b/public/components/event_analytics/explorer/visualizations/shared_components/plotly_viz_editor/index.tsx index 1238af2fed..088751a9f3 100644 --- a/public/components/event_analytics/explorer/visualizations/shared_components/plotly_viz_editor/index.tsx +++ b/public/components/event_analytics/explorer/visualizations/shared_components/plotly_viz_editor/index.tsx @@ -1 +1,2 @@ export { PlotlyVizEditor } from './plotly_viz_editor'; +export { PlotlyEditorActionsMenu } from './plotly_actions'; diff --git a/public/components/event_analytics/explorer/visualizations/visualization_specs/default_spec.ts b/public/components/event_analytics/explorer/visualizations/visualization_specs/default_spec.ts index 310f6613fd..e71363c946 100644 --- a/public/components/event_analytics/explorer/visualizations/visualization_specs/default_spec.ts +++ b/public/components/event_analytics/explorer/visualizations/visualization_specs/default_spec.ts @@ -1,6 +1,4 @@ // @ts-ignore - -import hjson from 'hjson'; import defaultLayoutSpec from '!!raw-loader!./default.layout.spec.hjson'; import defaultDataSpec from '!!raw-loader!./default.data.spec.hjson'; diff --git a/public/components/visualizations/assets/__tests__/__snapshots__/assets.test.tsx.snap b/public/components/visualizations/assets/__tests__/__snapshots__/assets.test.tsx.snap deleted file mode 100644 index 3b213ff7d2..0000000000 --- a/public/components/visualizations/assets/__tests__/__snapshots__/assets.test.tsx.snap +++ /dev/null @@ -1,64 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Assets components Renders lens icon of bar component 1`] = ` - - - - - - -`; - -exports[`Assets components Renders lens icon of horizontal bar component 1`] = ` - - - - - - -`; - -exports[`Assets components Renders lens icon of line component 1`] = ` - - - - - - -`; diff --git a/public/components/visualizations/assets/__tests__/assets.test.tsx b/public/components/visualizations/assets/__tests__/assets.test.tsx deleted file mode 100644 index 3b3263533e..0000000000 --- a/public/components/visualizations/assets/__tests__/assets.test.tsx +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import { configure, mount } from 'enzyme'; -import Adapter from 'enzyme-adapter-react-16'; -import React from 'react'; -import { waitFor } from '@testing-library/react'; -import { LensIconChartBar } from '../chart_bar'; -import { LensIconChartBarHorizontal } from '../chart_bar_horizontal'; -import { LensIconChartLine } from '../chart_line'; - - -describe('Assets components', () => { - configure({ adapter: new Adapter() }); - - it('Renders lens icon of bar component', async () => { - - const wrapper = mount( - - ); - - wrapper.update(); - - await waitFor(() => { - expect(wrapper).toMatchSnapshot(); - }); - }); - - it('Renders lens icon of horizontal bar component', async () => { - - const wrapper = mount( - - ); - - wrapper.update(); - - await waitFor(() => { - expect(wrapper).toMatchSnapshot(); - }); - }); - - it('Renders lens icon of line component', async () => { - - const wrapper = mount( - - ); - - wrapper.update(); - - await waitFor(() => { - expect(wrapper).toMatchSnapshot(); - }); - }); -}); \ No newline at end of file diff --git a/public/components/visualizations/assets/chart_bar.tsx b/public/components/visualizations/assets/chart_bar.tsx deleted file mode 100644 index 3ee43ea227..0000000000 --- a/public/components/visualizations/assets/chart_bar.tsx +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import React from 'react'; -import { EuiIconProps } from '@elastic/eui'; - -export const LensIconChartBar = ({ title, titleId, ...props }: Omit) => ( - - {title ? {title} : null} - - - -); diff --git a/public/components/visualizations/assets/chart_bar_horizontal.tsx b/public/components/visualizations/assets/chart_bar_horizontal.tsx deleted file mode 100644 index 0ccfa6a6cb..0000000000 --- a/public/components/visualizations/assets/chart_bar_horizontal.tsx +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import React from 'react'; -import { EuiIconProps } from '@elastic/eui'; - -export const LensIconChartBarHorizontal = ({ - title, - titleId, - ...props -}: Omit) => ( - - {title ? {title} : null} - - - -); diff --git a/public/components/visualizations/assets/chart_datatable.tsx b/public/components/visualizations/assets/chart_datatable.tsx deleted file mode 100644 index d6a5cb733e..0000000000 --- a/public/components/visualizations/assets/chart_datatable.tsx +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { EuiIconProps } from '@elastic/eui'; - -export const LensIconChartDatatable = ({ - title, - titleId, - ...props -}: Omit) => ( - - {title ? {title} : null} - - - -); diff --git a/public/components/visualizations/assets/chart_line.tsx b/public/components/visualizations/assets/chart_line.tsx deleted file mode 100644 index af6b1294ca..0000000000 --- a/public/components/visualizations/assets/chart_line.tsx +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -import React from 'react'; -import { EuiIconProps } from '@elastic/eui'; - -export const LensIconChartLine = ({ title, titleId, ...props }: Omit) => ( - - {title ? {title} : null} - - - -); diff --git a/public/components/visualizations/assets/chart_pie.tsx b/public/components/visualizations/assets/chart_pie.tsx deleted file mode 100644 index 56a18b9d61..0000000000 --- a/public/components/visualizations/assets/chart_pie.tsx +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; -import { EuiIconProps } from '@elastic/eui'; - -export const LensIconChartPie = ({ title, titleId, ...props }: Omit) => ( - - {title ? {title} : null} - - - -); diff --git a/public/components/visualizations/charts/__tests__/__snapshots__/bar.test.tsx.snap b/public/components/visualizations/charts/__tests__/__snapshots__/bar.test.tsx.snap index 05af82b07e..66bb8f9932 100644 --- a/public/components/visualizations/charts/__tests__/__snapshots__/bar.test.tsx.snap +++ b/public/components/visualizations/charts/__tests__/__snapshots__/bar.test.tsx.snap @@ -480,7 +480,6 @@ exports[`Veritcal Bar component Renders veritcal bar component 1`] = ` "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarVerticalStacked", "id": "bar", "label": "Vertical bar", diff --git a/public/components/visualizations/charts/__tests__/__snapshots__/gauge.test.tsx.snap b/public/components/visualizations/charts/__tests__/__snapshots__/gauge.test.tsx.snap index 70e513288d..ec25227faf 100644 --- a/public/components/visualizations/charts/__tests__/__snapshots__/gauge.test.tsx.snap +++ b/public/components/visualizations/charts/__tests__/__snapshots__/gauge.test.tsx.snap @@ -349,7 +349,6 @@ exports[`Gauge component Renders gauge component 1`] = ` ], }, "fulllabel": "Gauge", - "icon": [Function], "icontype": "visGauge", "id": "gauge", "label": "Gauge", diff --git a/public/components/visualizations/charts/__tests__/__snapshots__/heatmap.test.tsx.snap b/public/components/visualizations/charts/__tests__/__snapshots__/heatmap.test.tsx.snap index 497c9aa435..6bce0daa07 100644 --- a/public/components/visualizations/charts/__tests__/__snapshots__/heatmap.test.tsx.snap +++ b/public/components/visualizations/charts/__tests__/__snapshots__/heatmap.test.tsx.snap @@ -480,7 +480,6 @@ exports[`Heatmap component Renders heatmap component 1`] = ` "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarVerticalStacked", "id": "bar", "label": "Vertical bar", diff --git a/public/components/visualizations/charts/__tests__/__snapshots__/histogram.test.tsx.snap b/public/components/visualizations/charts/__tests__/__snapshots__/histogram.test.tsx.snap index 17bdfda8c6..4a40cb3c7b 100644 --- a/public/components/visualizations/charts/__tests__/__snapshots__/histogram.test.tsx.snap +++ b/public/components/visualizations/charts/__tests__/__snapshots__/histogram.test.tsx.snap @@ -480,7 +480,6 @@ exports[`Histogram component Renders histogram component 1`] = ` "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarVerticalStacked", "id": "bar", "label": "Vertical bar", diff --git a/public/components/visualizations/charts/__tests__/__snapshots__/horizontal_bar.test.tsx.snap b/public/components/visualizations/charts/__tests__/__snapshots__/horizontal_bar.test.tsx.snap index 55d4539c5b..639a58d450 100644 --- a/public/components/visualizations/charts/__tests__/__snapshots__/horizontal_bar.test.tsx.snap +++ b/public/components/visualizations/charts/__tests__/__snapshots__/horizontal_bar.test.tsx.snap @@ -480,7 +480,6 @@ exports[`Horizontal bar component Renders horizontal bar component 1`] = ` "fillopacity": 70, "fulllabel": "Horizontal bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarHorizontalStacked", "id": "horizontal_bar", "label": "Horizontal bar", diff --git a/public/components/visualizations/charts/__tests__/__snapshots__/line.test.tsx.snap b/public/components/visualizations/charts/__tests__/__snapshots__/line.test.tsx.snap index 311ce82043..f3ee210d99 100644 --- a/public/components/visualizations/charts/__tests__/__snapshots__/line.test.tsx.snap +++ b/public/components/visualizations/charts/__tests__/__snapshots__/line.test.tsx.snap @@ -480,7 +480,6 @@ exports[`Line component Renders line component 1`] = ` "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarVerticalStacked", "id": "bar", "label": "Vertical bar", diff --git a/public/components/visualizations/charts/__tests__/__snapshots__/metrics.test.tsx.snap b/public/components/visualizations/charts/__tests__/__snapshots__/metrics.test.tsx.snap index c001a02af1..b76b288e58 100644 --- a/public/components/visualizations/charts/__tests__/__snapshots__/metrics.test.tsx.snap +++ b/public/components/visualizations/charts/__tests__/__snapshots__/metrics.test.tsx.snap @@ -447,7 +447,6 @@ exports[`Metrics component Renders Metrics component 1`] = ` ], }, "fulllabel": "Metrics", - "icon": [Function], "icontype": "stats", "id": "metrics", "label": "Metrics", diff --git a/public/components/visualizations/charts/__tests__/__snapshots__/pie.test.tsx.snap b/public/components/visualizations/charts/__tests__/__snapshots__/pie.test.tsx.snap index 9dbd2b6037..2415c523fa 100644 --- a/public/components/visualizations/charts/__tests__/__snapshots__/pie.test.tsx.snap +++ b/public/components/visualizations/charts/__tests__/__snapshots__/pie.test.tsx.snap @@ -480,7 +480,6 @@ exports[`Pie component Renders pie component 1`] = ` "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarVerticalStacked", "id": "bar", "label": "Vertical bar", diff --git a/public/components/visualizations/charts/__tests__/__snapshots__/text.test.tsx.snap b/public/components/visualizations/charts/__tests__/__snapshots__/text.test.tsx.snap index 41c61aece0..c5135ca38d 100644 --- a/public/components/visualizations/charts/__tests__/__snapshots__/text.test.tsx.snap +++ b/public/components/visualizations/charts/__tests__/__snapshots__/text.test.tsx.snap @@ -463,7 +463,6 @@ exports[`Text component Renders text component 1`] = ` "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarVerticalStacked", "id": "bar", "label": "Vertical bar", diff --git a/public/components/visualizations/charts/__tests__/__snapshots__/treemap.test.tsx.snap b/public/components/visualizations/charts/__tests__/__snapshots__/treemap.test.tsx.snap index 2b6713d8b6..f19bb31418 100644 --- a/public/components/visualizations/charts/__tests__/__snapshots__/treemap.test.tsx.snap +++ b/public/components/visualizations/charts/__tests__/__snapshots__/treemap.test.tsx.snap @@ -480,7 +480,6 @@ exports[`Treemap component Renders treemap component 1`] = ` "fillopacity": 70, "fulllabel": "Vertical bar", "groupwidth": 0.7, - "icon": [Function], "icontype": "visBarVerticalStacked", "id": "bar", "label": "Vertical bar", diff --git a/public/components/visualizations/charts/bar/bar_type.ts b/public/components/visualizations/charts/bar/bar_type.ts index 8fc51ce22e..1d51fc0dcd 100644 --- a/public/components/visualizations/charts/bar/bar_type.ts +++ b/public/components/visualizations/charts/bar/bar_type.ts @@ -5,7 +5,6 @@ import { Bar } from './bar'; import { getPlotlySharedConfigs, getPlotlyCategory } from '../shared/shared_configs'; -import { LensIconChartBar } from '../../assets/chart_bar'; import { VizDataPanel } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/default_vis_editor'; import { ConfigEditor } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/json_editor'; import { @@ -41,7 +40,6 @@ export const createBarTypeDefinition = (params: any) => ({ dataLoss: 'nothing', }, category: VIS_CATEGORY.BASICS, - icon: LensIconChartBar, categoryaxis: 'xaxis', seriesaxis: 'yaxis', orientation: isHorizontalBar(params.type) ? BarOrientation.horizontal : BarOrientation.vertical, diff --git a/public/components/visualizations/charts/bubble/bubble_type.ts b/public/components/visualizations/charts/bubble/bubble_type.ts index b4cac8ded6..a5ed32f2ee 100644 --- a/public/components/visualizations/charts/bubble/bubble_type.ts +++ b/public/components/visualizations/charts/bubble/bubble_type.ts @@ -5,7 +5,6 @@ import { Bubble } from './bubble'; import { getPlotlySharedConfigs, getPlotlyCategory } from '../shared/shared_configs'; -import { LensIconChartPie } from '../../assets/chart_pie'; import { VizDataPanel } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/default_vis_editor'; import { ConfigEditor } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/json_editor'; import { ConfigValueOptions } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/config_controls'; @@ -62,7 +61,6 @@ export const createBubbleVisDefinition = () => ({ }, ], }, - icon: LensIconChartPie, visconfig: { layout: { ...sharedConfigs.layout, diff --git a/public/components/visualizations/charts/data_table/data_table_type.ts b/public/components/visualizations/charts/data_table/data_table_type.ts index 7ad582ccdf..eacb37be3c 100644 --- a/public/components/visualizations/charts/data_table/data_table_type.ts +++ b/public/components/visualizations/charts/data_table/data_table_type.ts @@ -5,9 +5,6 @@ import { DataTable } from './data_table'; import { getPlotlySharedConfigs, getPlotlyCategory } from '../shared/shared_configs'; -import { LensIconChartDatatable } from '../../assets/chart_datatable'; -import { ConfigEditor } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/json_editor'; -import { ConfigAvailability } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/config_availability'; import { VizDataPanel } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/default_vis_editor'; import { InputFieldItem, @@ -28,7 +25,6 @@ export const createDatatableTypeDefinition = (params: any = {}) => ({ fulllabel: 'Table View', icontype: 'visTable', category: VIS_CATEGORY.BASICS, - icon: LensIconChartDatatable, showtableheader: true, enablepagination: true, colunmfilter: false, diff --git a/public/components/visualizations/charts/financial/gauge/gauge_type.ts b/public/components/visualizations/charts/financial/gauge/gauge_type.ts index 2da38fefdf..d273b19c53 100644 --- a/public/components/visualizations/charts/financial/gauge/gauge_type.ts +++ b/public/components/visualizations/charts/financial/gauge/gauge_type.ts @@ -5,7 +5,6 @@ import { Gauge } from './gauge'; import { getPlotlySharedConfigs, getPlotlyCategory } from '../../shared/shared_configs'; -import { LensIconChartLine } from '../../../assets/chart_line'; import { VizDataPanel } from '../../../../event_analytics/explorer/visualizations/config_panel/config_panes/default_vis_editor'; import { ConfigEditor } from '../../../../event_analytics/explorer/visualizations/config_panel/config_panes/json_editor'; import { @@ -32,7 +31,6 @@ export const createGaugeTypeDefinition = (params: any = {}) => ({ selection: { dataLoss: 'nothing', }, - icon: LensIconChartLine, valueseries: 'yaxis', editorconfig: { panelTabs: [ diff --git a/public/components/visualizations/charts/lines/line_type.ts b/public/components/visualizations/charts/lines/line_type.ts index b82e44eb00..aa145ea862 100644 --- a/public/components/visualizations/charts/lines/line_type.ts +++ b/public/components/visualizations/charts/lines/line_type.ts @@ -5,15 +5,12 @@ import { Line } from './line'; import { getPlotlySharedConfigs, getPlotlyCategory } from '../shared/shared_configs'; -import { LensIconChartLine } from '../../assets/chart_line'; import { VizDataPanel } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/default_vis_editor'; -import { ConfigEditor } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/json_editor'; import { ConfigThresholds, ConfigLineChartStyles, ConfigLegend, InputFieldItem, - ConfigColorTheme, } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/config_controls'; import { ConfigAvailability } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/config_availability'; import { @@ -49,7 +46,6 @@ export const createLineTypeDefinition = (params: any = {}) => ({ selection: { dataLoss: 'nothing', }, - icon: LensIconChartLine, categoryaxis: 'xaxis', seriesaxis: 'yaxis', editorconfig: { diff --git a/public/components/visualizations/charts/maps/heatmap.tsx b/public/components/visualizations/charts/maps/heatmap.tsx index ad08ac26f1..262ccf05f4 100644 --- a/public/components/visualizations/charts/maps/heatmap.tsx +++ b/public/components/visualizations/charts/maps/heatmap.tsx @@ -18,7 +18,6 @@ import { getPropName, } from '../../../../components/event_analytics/utils/utils'; import { IVisualizationContainerProps } from '../../../../../common/types/explorer'; -import { VisCanvassPlaceholder } from '../../../event_analytics/explorer/visualizations/shared_components/vis_canvass_placeholder'; import { Plt } from '../../plotly/plot'; import { AGGREGATIONS, GROUPBY } from '../../../../../common/constants/explorer'; import { PLOT_MARGIN } from '../../../../../common/constants/shared'; diff --git a/public/components/visualizations/charts/maps/heatmap_type.ts b/public/components/visualizations/charts/maps/heatmap_type.ts index 6501aa04ac..ff9e7abd7a 100644 --- a/public/components/visualizations/charts/maps/heatmap_type.ts +++ b/public/components/visualizations/charts/maps/heatmap_type.ts @@ -5,11 +5,8 @@ import { HeatMap } from './heatmap'; import { getPlotlySharedConfigs, getPlotlyCategory } from '../shared/shared_configs'; -import { LensIconChartPie } from '../../assets/chart_pie'; import { VizDataPanel } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/default_vis_editor'; -import { ConfigEditor } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/json_editor'; import { - ConfigValueOptions, HeatmapColorPalettePicker, ConfigChartOptions, PanelItem, @@ -37,7 +34,6 @@ export const createMapsVisDefinition = () => ({ selection: { dataLoss: 'nothing', }, - icon: LensIconChartPie, editorconfig: { panelTabs: [ { diff --git a/public/components/visualizations/charts/maps/treemap_type.ts b/public/components/visualizations/charts/maps/treemap_type.ts index 1a87a428b0..788a75e4b6 100644 --- a/public/components/visualizations/charts/maps/treemap_type.ts +++ b/public/components/visualizations/charts/maps/treemap_type.ts @@ -5,7 +5,6 @@ import { TreeMap } from './treemaps'; import { getPlotlySharedConfigs, getPlotlyCategory } from '../shared/shared_configs'; -import { LensIconChartBar } from '../../assets/chart_bar'; import { VizDataPanel } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/default_vis_editor'; import { ConfigEditor } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/json_editor'; import { @@ -24,9 +23,7 @@ const VIS_CATEGORY = getPlotlyCategory(); const { SortSectors } = DEFAULT_CHART_STYLES; -export interface BarTypeParams {} - -export const createTreeMapDefinition = (params: BarTypeParams = {}) => ({ +export const createTreeMapDefinition = (params: any) => ({ name: 'tree_map', type: 'tree_map', id: 'tree_map', @@ -37,7 +34,6 @@ export const createTreeMapDefinition = (params: BarTypeParams = {}) => ({ }, category: VIS_CATEGORY.BASICS, icontype: 'heatmap', - icon: LensIconChartBar, categoryaxis: 'xaxis', seriesaxis: 'yaxis', orientation: 'v', diff --git a/public/components/visualizations/charts/metrics/metrics_type.ts b/public/components/visualizations/charts/metrics/metrics_type.ts index bc8f6b5461..e13df7744b 100644 --- a/public/components/visualizations/charts/metrics/metrics_type.ts +++ b/public/components/visualizations/charts/metrics/metrics_type.ts @@ -5,7 +5,6 @@ import { Metrics } from './metrics'; import { getPlotlySharedConfigs, getPlotlyCategory } from '../shared/shared_configs'; -import { LensIconChartLine } from '../../assets/chart_line'; import { PLOTLY_COLOR } from '../../../../../common/constants/shared'; import { VizDataPanel } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/default_vis_editor'; import { ConfigEditor } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/json_editor'; @@ -17,7 +16,6 @@ import { TextInputFieldItem, } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/config_controls'; import { fetchConfigObject } from '../../../event_analytics/utils/utils'; -import { ConfigAvailability } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/config_controls/config_availability'; import { DEFAULT_METRICS_CHART_PARAMETERS } from '../../../../../common/constants/explorer'; const sharedConfigs = getPlotlySharedConfigs(); @@ -40,7 +38,6 @@ export const createMetricsTypeDefinition = (params: any = {}) => ({ fulllabel: 'Metrics', icontype: 'stats', category: VIS_CATEGORY.BASICS, - icon: LensIconChartLine, categoryaxis: 'xaxis', seriesaxis: 'yaxis', charttype: DefaultChartType, diff --git a/public/components/visualizations/charts/pie/pie_type.ts b/public/components/visualizations/charts/pie/pie_type.ts index 2ec2dc1e72..b161c515ff 100644 --- a/public/components/visualizations/charts/pie/pie_type.ts +++ b/public/components/visualizations/charts/pie/pie_type.ts @@ -5,18 +5,14 @@ import { Pie } from './pie'; import { getPlotlySharedConfigs, getPlotlyCategory } from '../shared/shared_configs'; -import { LensIconChartPie } from '../../assets/chart_pie'; import { VizDataPanel } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/default_vis_editor'; -import { ConfigEditor } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/json_editor'; import { - ColorPalettePicker, ConfigChartOptions, ConfigLegend, InputFieldItem, ButtonGroupItem, } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/config_controls'; import { fetchConfigObject } from '../../../../components/event_analytics/utils/utils'; -import { DEFAULT_PALETTE, PIE_PALETTES } from '../../../../../common/constants/colors'; import { PLOTLY_COLOR, DEFAULT_CHART_STYLES } from '../../../../../common/constants/shared'; import { DEFAULT_PIE_CHART_PARAMETERS } from '../../../../../common/constants/explorer'; @@ -39,7 +35,6 @@ export const createPieTypeDefinition = (params: any) => ({ categoryaxis: 'xaxis', seriesaxis: 'yaxis', mode: DefaultMode, - icon: LensIconChartPie, editorconfig: { panelTabs: [ { diff --git a/public/components/visualizations/charts/text/text_type.ts b/public/components/visualizations/charts/text/text_type.ts index 183fe92357..3e096ac5a2 100644 --- a/public/components/visualizations/charts/text/text_type.ts +++ b/public/components/visualizations/charts/text/text_type.ts @@ -5,7 +5,6 @@ import { Text } from './text'; import { getPlotlySharedConfigs, getPlotlyCategory } from '../shared/shared_configs'; -import { LensIconChartLine } from '../../assets/chart_line'; import { PLOTLY_COLOR } from '../../../../../common/constants/shared'; import { VizDataPanel } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/default_vis_editor'; import { ConfigText } from '../../../event_analytics/explorer/visualizations/config_panel/config_panes/config_controls'; @@ -24,7 +23,6 @@ export const createTextTypeDefinition = (params: any = {}) => ({ selection: { dataLoss: 'nothing', }, - icon: LensIconChartLine, categoryaxis: 'xaxis', seriesaxis: 'yaxis', editorconfig: {