From de0fef80b88f3ffb459d538681b866580e6c647f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 14 Aug 2023 16:24:04 +0000 Subject: [PATCH] Changes Panel Titles to H2 and rearranges the details content to details panel (#918) * fix name change bug and modify test to test behavior Signed-off-by: Derek Ho * update fail backport Signed-off-by: Derek Ho * change panel titles to h2 and rearrange Signed-off-by: Derek Ho * remove unecessary imports Signed-off-by: Derek Ho --------- Signed-off-by: Derek Ho (cherry picked from commit 29f60284d2be949d703ce972d81764a49e9ac996) Signed-off-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 c54266f2a..173627c5a 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 f54fb131c..77fb9d7a0 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 7918f2b18..4a2911d57 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 36fe8b4e1..77b743e0b 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 d05f38ca5..93866383f 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 (