Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions x-pack/plugins/siem/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export const DETECTION_ENGINE_RULES_STATUS_URL = `${DETECTION_ENGINE_RULES_URL}/
export const DETECTION_ENGINE_PREPACKAGED_RULES_STATUS_URL = `${DETECTION_ENGINE_RULES_URL}/prepackaged/_status`;

export const TIMELINE_URL = '/api/timeline';
export const TIMELINE_DRAFT_URL = `${TIMELINE_URL}/_draft`;
export const TIMELINE_EXPORT_URL = `${TIMELINE_URL}/_export`;
export const TIMELINE_IMPORT_URL = `${TIMELINE_URL}/_import`;

Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/siem/common/types/timeline/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,13 @@ const SavedSortRuntimeType = runtimeTypes.partial({

export enum TimelineType {
default = 'default',
draft = 'draft',
template = 'template',
}

export const TimelineTypeLiteralRt = runtimeTypes.union([
runtimeTypes.literal(TimelineType.template),
runtimeTypes.literal(TimelineType.draft),
runtimeTypes.literal(TimelineType.default),
]);

Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/siem/cypress/tasks/create_new_case.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const createNewCase = (newCase: TestCase) => {
cy.get(INSERT_TIMELINE_BTN).click({ force: true });
cy.get(TIMELINE_SEARCHBOX).type(`${newCase.timeline.title}{enter}`);
cy.get(TIMELINE).should('be.visible');
cy.wait(300);
cy.get(TIMELINE)
.eq(1)
.click({ force: true });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const getExportedIds = (selectedTimelines: OpenTimelineResult[]) => {
);
};

export const useEditTimelinBatchActions = ({
export const useEditTimelineBatchActions = ({
deleteTimelines,
selectedItems,
tableRef,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ describe('helpers', () => {
sortDirection: 'desc',
},
title: '',
timelineType: TimelineType.default,
timelineType: TimelineType.draft,
templateTimelineId: null,
templateTimelineVersion: null,
version: '1',
Expand Down Expand Up @@ -397,13 +397,14 @@ describe('helpers', () => {
sortDirection: 'desc',
},
title: '',
timelineType: TimelineType.default,
timelineType: TimelineType.draft,
templateTimelineId: null,
templateTimelineVersion: null,
version: '1',
width: 1100,
});
});

test('should merge columns when event.action is deleted without two extra column names of user.name', () => {
const timeline = {
savedObjectId: 'savedObject-1',
Expand All @@ -416,38 +417,80 @@ describe('helpers', () => {
savedObjectId: 'savedObject-1',
columns: [
{
aggregatable: undefined,
category: undefined,
columnHeaderType: 'not-filtered',
description: undefined,
example: undefined,
id: '@timestamp',
placeholder: undefined,
type: undefined,
width: 190,
},
{
aggregatable: undefined,
category: undefined,
columnHeaderType: 'not-filtered',
description: undefined,
example: undefined,
id: 'message',
placeholder: undefined,
type: undefined,
width: 180,
},
{
aggregatable: undefined,
category: undefined,
columnHeaderType: 'not-filtered',
description: undefined,
example: undefined,
id: 'event.category',
placeholder: undefined,
type: undefined,
width: 180,
},
{
aggregatable: undefined,
category: undefined,
columnHeaderType: 'not-filtered',
description: undefined,
example: undefined,
id: 'host.name',
placeholder: undefined,
type: undefined,
width: 180,
},
{
aggregatable: undefined,
category: undefined,
columnHeaderType: 'not-filtered',
description: undefined,
example: undefined,
id: 'source.ip',
placeholder: undefined,
type: undefined,
width: 180,
},
{
aggregatable: undefined,
category: undefined,
columnHeaderType: 'not-filtered',
description: undefined,
example: undefined,
id: 'destination.ip',
placeholder: undefined,
type: undefined,
width: 180,
},
{
aggregatable: undefined,
category: undefined,
columnHeaderType: 'not-filtered',
description: undefined,
example: undefined,
id: 'user.name',
placeholder: undefined,
type: undefined,
width: 180,
},
],
Expand All @@ -474,7 +517,7 @@ describe('helpers', () => {
},
loadingEventIds: [],
title: '',
timelineType: TimelineType.default,
timelineType: TimelineType.draft,
templateTimelineId: null,
templateTimelineVersion: null,
noteIds: [],
Expand Down Expand Up @@ -642,7 +685,7 @@ describe('helpers', () => {
},
loadingEventIds: [],
title: '',
timelineType: TimelineType.default,
timelineType: TimelineType.draft,
templateTimelineId: null,
templateTimelineVersion: null,
noteIds: [],
Expand Down
Loading