Skip to content

Commit

Permalink
[8.10] [Security Solution] Expandable flyout - update flyout header (#…
Browse files Browse the repository at this point in the history
…164514) (#164597)

# Backport

This will backport the following commits from `main` to `8.10`:
- [[Security Solution] Expandable flyout - update flyout header
(#164514)](#164514)

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

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

<!--BACKPORT
[{"author":{"name":"christineweng","email":"[email protected]"},"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//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](https://github.com/elastic/kibana/assets/18648970/b718beac-74d2-40fd-baf9-9c59aad6a46a)\r\n\r\nAfter\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/18648970/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//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](https://github.com/elastic/kibana/assets/18648970/b718beac-74d2-40fd-baf9-9c59aad6a46a)\r\n\r\nAfter\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/18648970/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//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](https://github.com/elastic/kibana/assets/18648970/b718beac-74d2-40fd-baf9-9c59aad6a46a)\r\n\r\nAfter\r\n\r\n\r\n![image](https://github.com/elastic/kibana/assets/18648970/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 <[email protected]>
  • Loading branch information
kibanamachine and christineweng authored Aug 23, 2023
1 parent 1f81e89 commit 6194242
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "インサイト",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "洞见",
Expand Down

0 comments on commit 6194242

Please sign in to comment.