From 5ed6f4d863219a5fd904691e0ebbcfa11b2612d1 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 09:28:09 -0700 Subject: [PATCH] Changes Panel Titles to H2 and rearranges the details content to details panel (#918) (#919) * 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] (cherry picked from commit 6a3b1c6d91d9f0baf70e1dfa582bacb64fc56a6c) --- auto_sync_commit_metadata.json | 4 +- .../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 +- 8 files changed, 359 insertions(+), 90 deletions(-) diff --git a/auto_sync_commit_metadata.json b/auto_sync_commit_metadata.json index ec2a99b1c..90e87b002 100644 --- a/auto_sync_commit_metadata.json +++ b/auto_sync_commit_metadata.json @@ -1,4 +1,4 @@ { - "last_github_commit": "baefa1c6a11e88a036c66256ebb312c2c8dc98fb", - "last_gitfarm_commit": "b6771b24904cbd6e62fc5829da10393f9536de71" + "last_github_commit": "6a3b1c6d91d9f0baf70e1dfa582bacb64fc56a6c", + "last_gitfarm_commit": "0f86cd50e78c6d9aa045376dd183e13f11546792" } \ No newline at end of file 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 (