From c26eeb6d410562edac93cf2b728f36c154783ff9 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 12:29:57 -0400 Subject: [PATCH] Changes Panel Titles to H2 and rearranges the details content to details panel (#918) (#920) * fix name change bug and modify test to test behavior * update fail backport * change panel titles to h2 and rearrange * remove unecessary imports --------- (cherry picked from commit 29f60284d2be949d703ce972d81764a49e9ac996) Signed-off-by: Derek Ho Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .../integration_details.test.tsx.snap | 301 ++++++++++++++++-- .../integration_fields.test.tsx.snap | 22 +- .../components/integration_assets_panel.tsx | 6 +- .../components/integration_details_panel.tsx | 61 +++- .../components/integration_fields_panel.tsx | 6 +- .../components/integration_overview_panel.tsx | 41 --- .../integration_screenshots_panel.tsx | 8 +- 7 files changed, 357 insertions(+), 88 deletions(-) diff --git a/public/components/integrations/components/__tests__/__snapshots__/integration_details.test.tsx.snap b/public/components/integrations/components/__tests__/__snapshots__/integration_details.test.tsx.snap index c54266f2a0..173627c5a3 100644 --- a/public/components/integrations/components/__tests__/__snapshots__/integration_details.test.tsx.snap +++ b/public/components/integrations/components/__tests__/__snapshots__/integration_details.test.tsx.snap @@ -8,35 +8,296 @@ exports[`Available Integration Table View Test Renders nginx integration table v className="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow" data-test-subj="nginx-details" > - - +

-
- - Details - -
- - + Details +

+
- +
- Nginx HTTP server collector + +
+ +
+

+ Version +

+
+
+ +
+ + +
+ 1.0.1 +
+
+
+ + +
+ +
+

+ Category +

+
+
+ +
+ + +
+ + + + + + + communication + + + + + + + + + + + + + http + + + + + + + + + + + + + logs + + + + + + +
+
+
+ + +
+ +
+

+ Contributer +

+
+
+ + + + +
+ +
+

+ License +

+
+
+ +
+ + +
+ Apache-2.0 +
+
+
+ +
+ + +
+ +
+

+ Description +

+
+
+ +
+ + +
+ Nginx HTTP server collector +
+
- +
`; diff --git a/public/components/integrations/components/__tests__/__snapshots__/integration_fields.test.tsx.snap b/public/components/integrations/components/__tests__/__snapshots__/integration_fields.test.tsx.snap index f54fb131cd..77fb9d7a07 100644 --- a/public/components/integrations/components/__tests__/__snapshots__/integration_fields.test.tsx.snap +++ b/public/components/integrations/components/__tests__/__snapshots__/integration_fields.test.tsx.snap @@ -8,23 +8,13 @@ exports[`Available Integration Table View Test Renders nginx integration table v className="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow" data-test-subj="nginx-fields" > - - +

-
- - Fields - -
- - + Fields +

+ diff --git a/public/components/integrations/components/integration_assets_panel.tsx b/public/components/integrations/components/integration_assets_panel.tsx index 7918f2b185..4a2911d577 100644 --- a/public/components/integrations/components/integration_assets_panel.tsx +++ b/public/components/integrations/components/integration_assets_panel.tsx @@ -9,10 +9,10 @@ import { EuiSpacer, EuiTableFieldDataColumnType, EuiText, + EuiTitle, } from '@elastic/eui'; import React from 'react'; import _ from 'lodash'; -import { PanelTitle } from '../../trace_analytics/components/common/helper_functions'; import { ASSET_FILTER_OPTIONS } from '../../../../common/constants/integrations'; export function IntegrationAssets(props: any) { @@ -76,7 +76,9 @@ export function IntegrationAssets(props: any) { return ( - + +

Assets

+
- + +

Details

+
- {config.description} + + + +

Version

+
+ + {config.version} +
+ + +

Category

+
+ + + {config.components.map((cateogry) => { + return {cateogry.name}; + })} + +
+ + +

Contributer

+
+ + + {config.author} + +
+ + +

License

+
+ + {config.license} +
+
+ + +

Description

+
+ + {config.description} +
); } diff --git a/public/components/integrations/components/integration_fields_panel.tsx b/public/components/integrations/components/integration_fields_panel.tsx index 36fe8b4e1c..77b743e0b5 100644 --- a/public/components/integrations/components/integration_fields_panel.tsx +++ b/public/components/integrations/components/integration_fields_panel.tsx @@ -9,10 +9,10 @@ import { EuiSpacer, EuiTableFieldDataColumnType, EuiText, + EuiTitle, } from '@elastic/eui'; import React from 'react'; import _ from 'lodash'; -import { PanelTitle } from '../../trace_analytics/components/common/helper_functions'; export function IntegrationFields(props: any) { const config = props.integration; @@ -93,7 +93,9 @@ export function IntegrationFields(props: any) { return ( - + +

Fields

+
- - - - -

Version

-
- - {config.version} -
- - -

Category

-
- - - {config.components.map((cateogry) => { - return {cateogry.name}; - })} - -
- - -

Contributer

-
- - - {config.author} - -
- - -

License

-
- - {config.license} -
-
); diff --git a/public/components/integrations/components/integration_screenshots_panel.tsx b/public/components/integrations/components/integration_screenshots_panel.tsx index d05f38ca5e..93866383f3 100644 --- a/public/components/integrations/components/integration_screenshots_panel.tsx +++ b/public/components/integrations/components/integration_screenshots_panel.tsx @@ -3,9 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EuiFlexGroup, EuiPanel, EuiFlexItem, EuiImage } from '@elastic/eui'; +import { EuiFlexGroup, EuiPanel, EuiFlexItem, EuiImage, EuiTitle, EuiSpacer } from '@elastic/eui'; import React from 'react'; -import { PanelTitle } from '../../trace_analytics/components/common/helper_functions'; import { INTEGRATIONS_BASE } from '../../../../common/constants/shared'; export function IntegrationScreenshots(props: any) { @@ -18,7 +17,10 @@ export function IntegrationScreenshots(props: any) { return ( - + +

Screenshots

+
+ {screenshots?.map((screenshot: { path: string; annotation?: string }) => { return (