mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Cloud Posture]Right Align Back to resources button on Resource Findings page (#158526)
## Summary
Part of quick wins where back to resources button is now right aligned.
**Notes:**
The solution where we are hiding the Vulnerabilities and
Misconfigurations tabs doesn't seem to be a 'Quick win' as such for now
the fix will be this
<img width="1429" alt="Screenshot 2023-05-27 at 1 26 28 AM"
src="a3d261da
-96f6-4141-80fa-fd2c98ed7acb">
This commit is contained in:
parent
fb4946d0a5
commit
8f962c4351
2 changed files with 34 additions and 23 deletions
|
@ -5,7 +5,13 @@
|
|||
* 2.0.
|
||||
*/
|
||||
import React, { useCallback } from 'react';
|
||||
import { EuiSpacer, EuiButtonEmpty, type EuiDescriptionListProps } from '@elastic/eui';
|
||||
import {
|
||||
EuiSpacer,
|
||||
EuiButtonEmpty,
|
||||
type EuiDescriptionListProps,
|
||||
EuiFlexGroup,
|
||||
EuiFlexItem,
|
||||
} from '@elastic/eui';
|
||||
import { Link, useParams } from 'react-router-dom';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { generatePath } from 'react-router-dom';
|
||||
|
@ -190,25 +196,33 @@ export const ResourceFindings = ({ dataView }: FindingsBaseProps) => {
|
|||
}}
|
||||
loading={resourceFindings.isFetching}
|
||||
/>
|
||||
<PageTitle>
|
||||
<BackToResourcesButton />
|
||||
<PageTitleText
|
||||
title={
|
||||
<CloudPosturePageTitle
|
||||
title={i18n.translate(
|
||||
'xpack.csp.findings.resourceFindings.resourceFindingsPageTitle',
|
||||
{
|
||||
defaultMessage: '{resourceName} {hyphen} Findings',
|
||||
values: {
|
||||
resourceName: resourceFindings.data?.resourceName,
|
||||
hyphen: resourceFindings.data?.resourceName ? '-' : '',
|
||||
},
|
||||
}
|
||||
)}
|
||||
<EuiSpacer size="m" />
|
||||
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center">
|
||||
<EuiFlexItem grow={false}>
|
||||
<PageTitle>
|
||||
<PageTitleText
|
||||
title={
|
||||
<CloudPosturePageTitle
|
||||
title={i18n.translate(
|
||||
'xpack.csp.findings.resourceFindings.resourceFindingsPageTitle',
|
||||
{
|
||||
defaultMessage: '{resourceName} {hyphen} Findings',
|
||||
values: {
|
||||
resourceName: resourceFindings.data?.resourceName,
|
||||
hyphen: resourceFindings.data?.resourceName ? '-' : '',
|
||||
},
|
||||
}
|
||||
)}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</PageTitle>
|
||||
</PageTitle>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>
|
||||
<BackToResourcesButton />
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
<EuiSpacer />
|
||||
{resourceFindings.data && (
|
||||
<CspInlineDescriptionList
|
||||
listItems={getResourceFindingSharedValues({
|
||||
|
|
|
@ -36,10 +36,7 @@ export type OnAddFilter = <T extends string>(key: T, value: Serializable, negate
|
|||
|
||||
export const PageTitle: React.FC = ({ children }) => (
|
||||
<EuiTitle size="l">
|
||||
<div>
|
||||
{children}
|
||||
<EuiSpacer />
|
||||
</div>
|
||||
<div>{children}</div>
|
||||
</EuiTitle>
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue