[8.10] [Security Solution] Expandable flyout - update flyout header (#164514) (#164597)

# Backport

This will backport the following commits from `main` to `8.10`:
- [[Security Solution] Expandable flyout - update flyout header
(#164514)](https://github.com/elastic/kibana/pull/164514)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"christineweng","email":"18648970+christineweng@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-08-23T14:26:53Z","message":"[Security
Solution] Expandable flyout - update flyout header (#164514)\n\n##
Summary\r\n\r\nThis PR addresses a name mismatch mentioned
in\r\nhttps://github.com/elastic/kibana/issues/164398.\r\n\r\n- Flyout
header in non-alerts page are updated to \"Event details\" to\r\nmatch
previous flyout header\r\n- Fixed timestamp position to align with
header\r\n\r\nBefore\r\n\r\n![image](1e9b4e5a-ac18-4d8a-a732-458811942d1a)\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"3b6c2c2429726c423d12fb97537ed10927d3f1fa","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Threat
Hunting","Team:Threat
Hunting:Investigations","v8.10.0","v8.11.0"],"number":164514,"url":"https://github.com/elastic/kibana/pull/164514","mergeCommit":{"message":"[Security
Solution] Expandable flyout - update flyout header (#164514)\n\n##
Summary\r\n\r\nThis PR addresses a name mismatch mentioned
in\r\nhttps://github.com/elastic/kibana/issues/164398.\r\n\r\n- Flyout
header in non-alerts page are updated to \"Event details\" to\r\nmatch
previous flyout header\r\n- Fixed timestamp position to align with
header\r\n\r\nBefore\r\n\r\n![image](1e9b4e5a-ac18-4d8a-a732-458811942d1a)\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"3b6c2c2429726c423d12fb97537ed10927d3f1fa"}},"sourceBranch":"main","suggestedTargetBranches":["8.10"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164514","number":164514,"mergeCommit":{"message":"[Security
Solution] Expandable flyout - update flyout header (#164514)\n\n##
Summary\r\n\r\nThis PR addresses a name mismatch mentioned
in\r\nhttps://github.com/elastic/kibana/issues/164398.\r\n\r\n- Flyout
header in non-alerts page are updated to \"Event details\" to\r\nmatch
previous flyout header\r\n- Fixed timestamp position to align with
header\r\n\r\nBefore\r\n\r\n![image](1e9b4e5a-ac18-4d8a-a732-458811942d1a)\r\n\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [x] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"3b6c2c2429726c423d12fb97537ed10927d3f1fa"}}]}]
BACKPORT-->

Co-authored-by: christineweng <18648970+christineweng@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2023-08-23 12:56:18 -04:00 committed by GitHub
parent 1f81e89851
commit 61942420c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 10 deletions

View file

@ -17,7 +17,7 @@ import {
FLYOUT_HEADER_TITLE_TEST_ID,
} from './test_ids';
import { HeaderTitle } from './header_title';
import { DOCUMENT_DETAILS } from './translations';
import { EVENT_DETAILS } from './translations';
import moment from 'moment-timezone';
import { useDateFormat, useTimeZone } from '../../../common/lib/kibana';
import { mockDataFormattedForFieldBrowser, mockGetFieldsData } from '../mocks/mock_context';
@ -175,6 +175,6 @@ describe('<HeaderTitle />', () => {
const { getByTestId } = renderHeader(contextValue);
expect(getByTestId(FLYOUT_HEADER_TITLE_TEST_ID)).toHaveTextContent(DOCUMENT_DETAILS);
expect(getByTestId(FLYOUT_HEADER_TITLE_TEST_ID)).toHaveTextContent(EVENT_DETAILS);
});
});

View file

@ -19,7 +19,7 @@ import {
} from '../../../common/components/event_details/translations';
import { DocumentSeverity } from './severity';
import { RiskScore } from './risk_score';
import { DOCUMENT_DETAILS } from './translations';
import { EVENT_DETAILS } from './translations';
import { useBasicDataFromDetailsData } from '../../../timelines/components/side_panel/event_details/helpers';
import { useRightPanelContext } from '../context';
import { PreferenceFormattedDate } from '../../../common/components/formatted_date';
@ -79,11 +79,11 @@ export const HeaderTitle: VFC<HeaderTitleProps> = memo(({ flyoutIsExpandable })
<EuiSpacer size="s" />
<EuiTitle size="s">
<h4 data-test-subj={FLYOUT_HEADER_TITLE_TEST_ID}>
{isAlert && !isEmpty(ruleName) ? ruleName : DOCUMENT_DETAILS}
{isAlert && !isEmpty(ruleName) ? ruleName : EVENT_DETAILS}
</h4>
</EuiTitle>
<EuiSpacer size="s" />
<EuiFlexGroup direction="row" gutterSize="m">
<EuiFlexGroup direction="row" gutterSize={isAlert ? 'm' : 'none'}>
<EuiFlexItem grow={false}>
<DocumentStatus />
</EuiFlexItem>

View file

@ -19,9 +19,9 @@ export const COLLAPSE_DETAILS_BUTTON = i18n.translate(
{ defaultMessage: 'Collapse details' }
);
export const DOCUMENT_DETAILS = i18n.translate(
export const EVENT_DETAILS = i18n.translate(
'xpack.securitySolution.flyout.documentDetails.headerTitle',
{ defaultMessage: 'Document details' }
{ defaultMessage: 'Event details' }
);
export const SEVERITY_TITLE = i18n.translate(

View file

@ -33312,7 +33312,6 @@
"xpack.securitySolution.flyout.documentDetails.entitiesButton": "Entités",
"xpack.securitySolution.flyout.documentDetails.entitiesTitle": "Entités",
"xpack.securitySolution.flyout.documentDetails.expandDetailButton": "Développer les détails de l'alerte",
"xpack.securitySolution.flyout.documentDetails.headerTitle": "Détails des documents",
"xpack.securitySolution.flyout.documentDetails.highlightedFieldsTitle": "Champs en surbrillance",
"xpack.securitySolution.flyout.documentDetails.insightsOptions": "Options des informations exploitables",
"xpack.securitySolution.flyout.documentDetails.insightsTab": "Informations exploitables",

View file

@ -33311,7 +33311,6 @@
"xpack.securitySolution.flyout.documentDetails.entitiesButton": "エンティティ",
"xpack.securitySolution.flyout.documentDetails.entitiesTitle": "エンティティ",
"xpack.securitySolution.flyout.documentDetails.expandDetailButton": "アラート詳細を展開",
"xpack.securitySolution.flyout.documentDetails.headerTitle": "ドキュメント詳細",
"xpack.securitySolution.flyout.documentDetails.highlightedFieldsTitle": "ハイライトされたフィールド",
"xpack.securitySolution.flyout.documentDetails.insightsOptions": "インサイトオプション",
"xpack.securitySolution.flyout.documentDetails.insightsTab": "インサイト",

View file

@ -33307,7 +33307,6 @@
"xpack.securitySolution.flyout.documentDetails.entitiesButton": "实体",
"xpack.securitySolution.flyout.documentDetails.entitiesTitle": "实体",
"xpack.securitySolution.flyout.documentDetails.expandDetailButton": "展开告警详情",
"xpack.securitySolution.flyout.documentDetails.headerTitle": "文档详情",
"xpack.securitySolution.flyout.documentDetails.highlightedFieldsTitle": "突出显示的字段",
"xpack.securitySolution.flyout.documentDetails.insightsOptions": "洞见选项",
"xpack.securitySolution.flyout.documentDetails.insightsTab": "洞见",