-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SECURITY SOLUTION] Eql in timeline (#90816)
* add EQL as a language * add eql in timeline * fix type + unit test * move eql to it sown tab * fix merge issue + a liitle bug when creating anew timeline to reset eql textarea * fix cypress tests * fix lint error * fix bug from review Co-authored-by: Angela Chuang <yi-chun.chuang@elastic.co>
- Loading branch information
Showing
67 changed files
with
4,435 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
x-pack/plugins/security_solution/common/search_strategy/timeline/events/eql/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { EuiComboBoxOptionOption } from '@elastic/eui'; | ||
import { | ||
EqlSearchStrategyRequest, | ||
EqlSearchStrategyResponse, | ||
} from '../../../../../../data_enhanced/common'; | ||
import { Inspect, Maybe, PaginationInputPaginated } from '../../..'; | ||
import { TimelineEdges, TimelineEventsAllRequestOptions } from '../..'; | ||
import { EqlSearchResponse } from '../../../../detection_engine/types'; | ||
|
||
export interface TimelineEqlRequestOptions | ||
extends EqlSearchStrategyRequest, | ||
Omit<TimelineEventsAllRequestOptions, 'params'> { | ||
eventCategoryField?: string; | ||
tiebreakerField?: string; | ||
timestampField?: string; | ||
size?: number; | ||
} | ||
|
||
export interface TimelineEqlResponse extends EqlSearchStrategyResponse<EqlSearchResponse<unknown>> { | ||
edges: TimelineEdges[]; | ||
totalCount: number; | ||
pageInfo: Pick<PaginationInputPaginated, 'activePage' | 'querySize'>; | ||
inspect: Maybe<Inspect>; | ||
} | ||
|
||
export interface EqlOptionsData { | ||
keywordFields: EuiComboBoxOptionOption[]; | ||
dateFields: EuiComboBoxOptionOption[]; | ||
nonDateFields: EuiComboBoxOptionOption[]; | ||
} | ||
|
||
export interface EqlOptionsSelected { | ||
eventCategoryField?: string; | ||
tiebreakerField?: string; | ||
timestampField?: string; | ||
query?: string; | ||
size?: number; | ||
} | ||
|
||
export type FieldsEqlOptions = keyof EqlOptionsSelected; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.