Skip to content

Commit

Permalink
[Cloud Posture]Fix for resource subheader (#158504)
Browse files Browse the repository at this point in the history
## Summary

Fix for line breaks issue on sub header in findings resource view


![findings_resource](https://github.com/elastic/kibana/assets/8703149/c9400905-6cbc-4ebd-8780-cf65b611dc53)
  • Loading branch information
animehart authored May 26, 2023
1 parent 2ef9994 commit 99f10bc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const CspInlineDescriptionList = ({
color: euiTheme.colors.subduedText,
fontSize,
paddingRight: 0,
paddingInline: 0,
},
}}
descriptionProps={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@
* 2.0.
*/
import React, { useCallback } from 'react';
import {
EuiSpacer,
EuiButtonEmpty,
EuiPageHeader,
type EuiDescriptionListProps,
} from '@elastic/eui';
import { EuiSpacer, EuiButtonEmpty, type EuiDescriptionListProps } from '@elastic/eui';
import { Link, useParams } from 'react-router-dom';
import { FormattedMessage } from '@kbn/i18n-react';
import { generatePath } from 'react-router-dom';
Expand Down Expand Up @@ -214,21 +209,18 @@ export const ResourceFindings = ({ dataView }: FindingsBaseProps) => {
}
/>
</PageTitle>
<EuiPageHeader
description={
resourceFindings.data && (
<CspInlineDescriptionList
listItems={getResourceFindingSharedValues({
resourceId: decodedResourceId,
resourceName: resourceFindings.data?.resourceName || '',
resourceSubType: resourceFindings.data?.resourceSubType || '',
clusterId: resourceFindings.data?.clusterId || '',
cloudAccountName: resourceFindings.data?.cloudAccountName || '',
})}
/>
)
}
/>
{resourceFindings.data && (
<CspInlineDescriptionList
listItems={getResourceFindingSharedValues({
resourceId: decodedResourceId,
resourceName: resourceFindings.data?.resourceName || '',
resourceSubType: resourceFindings.data?.resourceSubType || '',
clusterId: resourceFindings.data?.clusterId || '',
cloudAccountName: resourceFindings.data?.cloudAccountName || '',
})}
/>
)}

<EuiSpacer />
{error && <ErrorCallout error={error} />}
{!error && (
Expand Down

0 comments on commit 99f10bc

Please sign in to comment.