diff --git a/public/components/custom_panels/__tests__/__snapshots__/custom_panel_table.test.tsx.snap b/public/components/custom_panels/__tests__/__snapshots__/custom_panel_table.test.tsx.snap index 3d8134d0c9..a82756a376 100644 --- a/public/components/custom_panels/__tests__/__snapshots__/custom_panel_table.test.tsx.snap +++ b/public/components/custom_panels/__tests__/__snapshots__/custom_panel_table.test.tsx.snap @@ -16,11 +16,13 @@ exports[`Panels Table Component render dashboard table container with panels 1`]
-

- Observability dashboards -

+

+ Observability dashboards +

+
-

- Observability dashboards -

+

+ Observability dashboards +

+
-

- Observability dashboards -

+

+ Observability dashboards +

+
-

+
+

+

@@ -446,10 +449,13 @@ exports[`Panels View Component render panel view so container and reload dashboa
-

+
+

+

@@ -1354,14 +1360,17 @@ exports[`Panels View Component renders panel view container with visualizations
- -

- +
+

+

+
- -

- +
+

+

+
-

+
+

+

@@ -446,10 +449,13 @@ exports[`Panels View SO Component render panel view so container and reload dash
-

+
+

+

@@ -879,10 +885,13 @@ exports[`Panels View SO Component renders panels view SO container with visualiz
-

+
+

+

diff --git a/public/components/custom_panels/custom_panel_table.tsx b/public/components/custom_panels/custom_panel_table.tsx index 5ea33c9ed8..92b55a6968 100644 --- a/public/components/custom_panels/custom_panel_table.tsx +++ b/public/components/custom_panels/custom_panel_table.tsx @@ -155,7 +155,7 @@ export const CustomPanelTable = ({ sourcePanel = legacyFetchResult.operationalPanel; } - const { id, ...newPanel } = { + const { ...newPanel } = { ...sourcePanel, title: newName, }; @@ -342,9 +342,9 @@ export const CustomPanelTable = ({ - +

Observability dashboards

-
+
@@ -374,11 +374,15 @@ export const CustomPanelTable = ({ isOpen={isActionsPopoverOpen} closePopover={() => setIsActionsPopoverOpen(false)} > - + - + Create Dashboard diff --git a/public/components/custom_panels/custom_panel_view.tsx b/public/components/custom_panels/custom_panel_view.tsx index 5b74bc0556..5be1810094 100644 --- a/public/components/custom_panels/custom_panel_view.tsx +++ b/public/components/custom_panels/custom_panel_view.tsx @@ -21,7 +21,7 @@ import { EuiPopover, EuiSpacer, EuiCompressedSuperDatePicker, - EuiTitle, + EuiText, OnTimeChangeProps, ShortDate, } from '@elastic/eui'; @@ -465,7 +465,11 @@ export const CustomPanelView = (props: CustomPanelViewProps) => { ); const saveButton = ( - editPanel('save')}> + editPanel('save')} + > Save ); @@ -612,9 +616,9 @@ export const CustomPanelView = (props: CustomPanelViewProps) => { {appPanel || ( <> - +

{openPanelName}

-
+ @@ -638,7 +642,7 @@ export const CustomPanelView = (props: CustomPanelViewProps) => { isOpen={panelsMenuPopover} closePopover={() => setPanelsMenuPopover(false)} > - + diff --git a/public/components/custom_panels/custom_panel_view_so.tsx b/public/components/custom_panels/custom_panel_view_so.tsx index 62f4efde0b..5db2548343 100644 --- a/public/components/custom_panels/custom_panel_view_so.tsx +++ b/public/components/custom_panels/custom_panel_view_so.tsx @@ -22,14 +22,14 @@ import { EuiPopover, EuiSpacer, EuiCompressedSuperDatePicker, - EuiTitle, + EuiText, OnTimeChangeProps, ShortDate, } from '@elastic/eui'; import { DurationRange } from '@elastic/eui/src/components/date_picker/types'; import last from 'lodash/last'; import moment from 'moment'; -import React, { useCallback, useEffect, useState } from 'react'; +import React, { useEffect, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { CoreStart } from '../../../../../src/core/public'; import { CREATE_PANEL_MESSAGE } from '../../../common/constants/custom_panels'; @@ -119,7 +119,6 @@ export const CustomPanelViewSO = (props: CustomPanelViewProps) => { parentBreadcrumbs, childBreadcrumbs, updateAvailabilityVizId, - cloneCustomPanel, onEditClick, onAddClick, } = props; @@ -131,7 +130,7 @@ export const CustomPanelViewSO = (props: CustomPanelViewProps) => { const [loading, setLoading] = useState(true); const [pplFilterValue, setPPLFilterValue] = useState(''); - const [baseQuery, setBaseQuery] = useState(''); + const [baseQuery, _] = useState(''); const [onRefresh, setOnRefresh] = useState(false); const [inputDisabled, setInputDisabled] = useState(true); @@ -375,7 +374,11 @@ export const CustomPanelViewSO = (props: CustomPanelViewProps) => { ); const saveButton = ( - editPanel('save')}> + editPanel('save')} + > Save ); @@ -562,9 +565,9 @@ export const CustomPanelViewSO = (props: CustomPanelViewProps) => { {appPanel || ( <> - +

{panel?.title}

-
+ @@ -587,7 +590,7 @@ export const CustomPanelViewSO = (props: CustomPanelViewProps) => { isOpen={panelsMenuPopover} closePopover={() => setPanelsMenuPopover(false)} > - +
diff --git a/public/components/custom_panels/helpers/__tests__/__snapshots__/custom_input_model.test.tsx.snap b/public/components/custom_panels/helpers/__tests__/__snapshots__/custom_input_model.test.tsx.snap index 7399b3e415..a14594c28a 100644 --- a/public/components/custom_panels/helpers/__tests__/__snapshots__/custom_input_model.test.tsx.snap +++ b/public/components/custom_panels/helpers/__tests__/__snapshots__/custom_input_model.test.tsx.snap @@ -8,7 +8,13 @@ exports[`Custom Input Model component renders custom input modal with multiple a > - Input test + +

+ Input test +

+
@@ -58,7 +64,13 @@ exports[`Custom Input Model component renders custom input modal with single arg > - Input test + +

+ Input test +

+
diff --git a/public/components/custom_panels/helpers/add_visualization_popover.tsx b/public/components/custom_panels/helpers/add_visualization_popover.tsx index 6772cfce7e..8b2b78d6ce 100644 --- a/public/components/custom_panels/helpers/add_visualization_popover.tsx +++ b/public/components/custom_panels/helpers/add_visualization_popover.tsx @@ -86,7 +86,7 @@ export const AddVisualizationPopover = ({ panelPaddingSize="none" anchorPosition="downLeft" > - + ); }; diff --git a/public/components/custom_panels/helpers/custom_input_modal.tsx b/public/components/custom_panels/helpers/custom_input_modal.tsx index dd073eb7b8..e99e4a1924 100644 --- a/public/components/custom_panels/helpers/custom_input_modal.tsx +++ b/public/components/custom_panels/helpers/custom_input_modal.tsx @@ -16,6 +16,7 @@ import { EuiCompressedFormRow, EuiCompressedFieldText, EuiSmallButton, + EuiText, } from '@elastic/eui'; /* @@ -33,7 +34,7 @@ import { * optionalArgs - Arguments needed to pass them to runModal function */ -type CustomInputModalProps = { +interface CustomInputModalProps { runModal: | ((value: string, value2: string, value3: string, value4: string) => void) | ((value: string) => void); @@ -47,7 +48,7 @@ type CustomInputModalProps = { openPanelName?: string; helpText?: string; optionalArgs?: string[]; -}; +} export const CustomInputModal = (props: CustomInputModalProps) => { const { @@ -71,7 +72,11 @@ export const CustomInputModal = (props: CustomInputModalProps) => { - {titletxt} + + +

{titletxt}

+
+
diff --git a/public/components/custom_panels/panel_modules/visualization_container/visualization_container.tsx b/public/components/custom_panels/panel_modules/visualization_container/visualization_container.tsx index a8895d4a06..669eee9068 100644 --- a/public/components/custom_panels/panel_modules/visualization_container/visualization_container.tsx +++ b/public/components/custom_panels/panel_modules/visualization_container/visualization_container.tsx @@ -132,12 +132,16 @@ export const VisualizationContainer = ({ -

{visualizationMetaData.name}

+ +

{visualizationMetaData.name}

+
- This PPL Query is generated in runtime from selected data source + + This PPL Query is generated in runtime from selected data source + {visualizationMetaData.query} @@ -156,12 +160,14 @@ export const VisualizationContainer = ({ -

{isError.errorMessage}

+ +

{isError.errorMessage}

+
- Error Details + Error Details {isError.errorDetails} @@ -388,10 +394,12 @@ export const VisualizationContainer = ({ isOpen={isPopoverOpen} closePopover={closeActionsMenu} anchorPosition="downLeft" + panelPaddingSize="none" > )} diff --git a/public/components/custom_panels/panel_modules/visualization_flyout/__tests__/__snapshots__/visualization_flyout.test.tsx.snap b/public/components/custom_panels/panel_modules/visualization_flyout/__tests__/__snapshots__/visualization_flyout.test.tsx.snap index ca10206760..3e040c5d63 100644 --- a/public/components/custom_panels/panel_modules/visualization_flyout/__tests__/__snapshots__/visualization_flyout.test.tsx.snap +++ b/public/components/custom_panels/panel_modules/visualization_flyout/__tests__/__snapshots__/visualization_flyout.test.tsx.snap @@ -74,15 +74,15 @@ exports[`Visualization Flyout Component renders add visualization Flyout 1`] = ` -

Select existing visualization

-
+
} > @@ -142,12 +142,15 @@ exports[`Visualization Flyout Component renders add visualization Flyout 1`] = `
-

- Select existing visualization -

+

+ Select existing visualization +

+
-

- Select existing visualization -

+

+ Select existing visualization +

+

-

- Select existing visualization -

+

+ Select existing visualization +

+
-

- Select existing visualization -

+

+ Select existing visualization +

+

-

- Select existing visualization -

+

+ Select existing visualization +

+
- -

- Select existing visualization -

-
+

+ Select existing visualization +

+
+

-

Replace visualization

-
+ } > @@ -1443,12 +1461,15 @@ exports[`Visualization Flyout Component renders replace visualization Flyout 1`]
-

- Replace visualization -

+

+ Replace visualization +

+

-

- Replace visualization -

+

+ Replace visualization +

+

-

- Replace visualization -

+

+ Replace visualization +

+
-

- Replace visualization -

+

+ Replace visualization +

+

-

- Replace visualization -

+

+ Replace visualization +

+
- -

- Replace visualization -

-
+

+ Replace visualization +

+
+

-

Select existing visualization

-
+ } > @@ -153,12 +153,15 @@ exports[`Visualization Flyout Component renders add visualization Flyout 1`] = `
-

- Select existing visualization -

+

+ Select existing visualization +

+
-

- Select existing visualization -

+

+ Select existing visualization +

+
-

- Select existing visualization -

+

+ Select existing visualization +

+
-

- Select existing visualization -

+

+ Select existing visualization +

+
-

- Select existing visualization -

+

+ Select existing visualization +

+
- -

- Select existing visualization -

-
+

+ Select existing visualization +

+
+ -

Replace visualization

-
+ } > @@ -1449,12 +1467,15 @@ exports[`Visualization Flyout Component renders replace visualization Flyout 1`]
-

- Replace visualization -

+

+ Replace visualization +

+
-

- Replace visualization -

+

+ Replace visualization +

+
-

- Replace visualization -

+

+ Replace visualization +

+
-

- Replace visualization -

+

+ Replace visualization +

+
-

- Replace visualization -

+

+ Replace visualization +

+
- -

- Replace visualization -

-
+

+ Replace visualization +

+
+ ); const closeModal = () => setIsModalVisible(false); - const showModal = (modalType: string) => { + const showModal = (_: string) => { setModalContent( -

{isPreviewError.errorMessage}

+ +

{isPreviewError.errorMessage}

+
- Error Details + Error Details {isPreviewError.errorDetails} @@ -267,11 +268,11 @@ export const VisaulizationFlyout = ({ const flyoutHeader = ( - +

{isFlyoutReplacement ? 'Replace visualization' : 'Select existing visualization'}

-
+
); diff --git a/public/components/custom_panels/panel_modules/visualization_flyout/visualization_flyout_so.tsx b/public/components/custom_panels/panel_modules/visualization_flyout/visualization_flyout_so.tsx index 691f89c994..b9d8845f34 100644 --- a/public/components/custom_panels/panel_modules/visualization_flyout/visualization_flyout_so.tsx +++ b/public/components/custom_panels/panel_modules/visualization_flyout/visualization_flyout_so.tsx @@ -28,7 +28,6 @@ import { EuiSelectOption, EuiSpacer, EuiText, - EuiTitle, EuiToolTip, ShortDate, } from '@elastic/eui'; @@ -128,17 +127,19 @@ export const VisaulizationFlyoutSO = ({ const [modalContent, setModalContent] = useState(<>); const closeModal = () => setIsModalVisible(false); - const showModal = (modalType: string) => { + const showModal = (_: string) => { setModalContent( -

{isPreviewError.errorMessage}

+ +

{isPreviewError.errorMessage}

+
- Error Details + Error Details {isPreviewError.errorDetails} @@ -177,7 +178,7 @@ export const VisaulizationFlyoutSO = ({ replaceVizInPanel(panel, replaceVisualizationId, selectValue, newVisualizationTitle) ); } else { - const visualizationsWithNewPanel = addVisualizationPanel({ + addVisualizationPanel({ savedVisualizationId: selectValue, onSuccess: `Visualization ${newVisualizationTitle} successfully added!`, onFailure: `Error in adding ${newVisualizationTitle} visualization to the panel`, @@ -249,11 +250,11 @@ export const VisaulizationFlyoutSO = ({ const flyoutHeader = ( - +

{isFlyoutReplacement ? 'Replace visualization' : 'Select existing visualization'}

-
+
);