Skip to content

Commit

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

This PR addresses a name mismatch mentioned in
#164398.

- Flyout header in non-alerts page are updated to "Event details" to
match previous flyout header
- Fixed timestamp position to align with header

Before

![image](https://github.com/elastic/kibana/assets/18648970/b718beac-74d2-40fd-baf9-9c59aad6a46a)

After

![image](https://github.com/elastic/kibana/assets/18648970/1e9b4e5a-ac18-4d8a-a732-458811942d1a)

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 3b6c2c2)
  • Loading branch information
christineweng committed Aug 23, 2023
1 parent 4960389 commit 40e9e2f
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 40e9e2f

Please sign in to comment.