Skip to content

Commit

Permalink
feat: add session id to highlighted fields
Browse files Browse the repository at this point in the history
  • Loading branch information
janmonschke committed May 16, 2022
1 parent 640bc62 commit 86c0390
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ export const mockAlertDetailsData = [
{ category: 'process', field: 'process.name', values: ['-'], originalValue: '-' },
{ category: 'process', field: 'process.pid', values: [0], originalValue: 0 },
{ category: 'process', field: 'process.executable', values: ['-'], originalValue: '-' },
{
category: 'process',
field: 'process.entry_leader.entity_id',
values: ['2938b3f873b4f3n84f938'],
originalValue: '2938b3f873b4f3n84f938',
},
{
category: 'agent',
field: 'agent.hostname',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { useRuleWithFallback } from '../../../detections/containers/detection_en
import { TestProviders, TestProvidersComponent } from '../../mock';
import { TimelineId } from '../../../../common/types';
import { mockBrowserFields } from '../../containers/source/mock';
import * as i18n from './translations';

jest.mock('../../lib/kibana');

Expand Down Expand Up @@ -68,7 +69,14 @@ describe('AlertSummaryView', () => {
</TestProviders>
);

['host.name', 'user.name', 'Rule type', 'query', 'Source event id'].forEach((fieldId) => {
[
'host.name',
'user.name',
i18n.RULE_TYPE,
'query',
i18n.SOURCE_EVENT_ID,
i18n.SESSION_ID,
].forEach((fieldId) => {
expect(getByText(fieldId));
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const alwaysDisplayedFields: EventSummaryField[] = [
{ id: 'user.name' },
{ id: ALERT_RULE_TYPE, label: i18n.RULE_TYPE },
{ id: 'kibana.alert.original_event.id', label: i18n.SOURCE_EVENT_ID },
{ id: 'process.entry_leader.entity_id', label: i18n.SESSION_ID },
];

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,7 @@ export const VIEW_RULE_DETAIL_PAGE = i18n.translate(
export const VIEW_ALL_FIELDS = i18n.translate('xpack.securitySolution.eventDetails.viewAllFields', {
defaultMessage: 'View all fields in table',
});

export const SESSION_ID = i18n.translate('xpack.securitySolution.eventDetails.sessionId', {
defaultMessage: 'Session ID',
});

0 comments on commit 86c0390

Please sign in to comment.