-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution] Add more actions to alerts flyout (#105767)
* add investigate in timeline action to flyout * close context menu on item clicked * add investigate in timeline * add investigat in timeline button * fix failing tests * add alerts status actions * update unit test * export alerts actions from hook * add disable props * add case action items * clean up * split alert status hook and hide add to case action * add useHoseIsolationAction hook * move out take action dropdown * refeactor hooks to only manage one thing * apply hooks to alerts table * clean up * fix unit tests * replace euiCodeBlock * take actions from case * fetch ecs in flyout footer * move fetch alert ecs to container * add AddExceptionModalWrapperData interface * fix cypress tests * update snapshot for json view * fix cypress test * update AddEndpointExceptionComponent * fix data retrieved from event details * fix host isolation action * use endpointAlertCheck Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
- Loading branch information
Showing
40 changed files
with
1,721 additions
and
711 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
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
78 changes: 37 additions & 41 deletions
78
...ity_solution/public/common/components/event_details/__snapshots__/json_view.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
35 changes: 35 additions & 0 deletions
35
...ion/public/detections/components/alerts_table/timeline_actions/add_endpoint_exception.tsx
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,35 @@ | ||
/* | ||
* 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 { EuiContextMenuItem, EuiText } from '@elastic/eui'; | ||
import React from 'react'; | ||
import * as i18n from '../translations'; | ||
|
||
interface AddEndpointExceptionProps { | ||
onClick: () => void; | ||
disabled?: boolean; | ||
} | ||
|
||
const AddEndpointExceptionComponent: React.FC<AddEndpointExceptionProps> = ({ | ||
onClick, | ||
disabled, | ||
}) => { | ||
return ( | ||
<EuiContextMenuItem | ||
key="add-endpoint-exception-menu-item" | ||
aria-label={i18n.ACTION_ADD_ENDPOINT_EXCEPTION} | ||
data-test-subj="add-endpoint-exception-menu-item" | ||
id="addEndpointException" | ||
onClick={onClick} | ||
disabled={disabled} | ||
> | ||
<EuiText size="m">{i18n.ACTION_ADD_ENDPOINT_EXCEPTION}</EuiText> | ||
</EuiContextMenuItem> | ||
); | ||
}; | ||
|
||
export const AddEndpointException = React.memo(AddEndpointExceptionComponent); |
34 changes: 34 additions & 0 deletions
34
..._solution/public/detections/components/alerts_table/timeline_actions/add_event_filter.tsx
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,34 @@ | ||
/* | ||
* 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 { EuiContextMenuItem, EuiText } from '@elastic/eui'; | ||
import React from 'react'; | ||
import * as i18n from '../translations'; | ||
|
||
interface AddEventFilterProps { | ||
onClick: () => void; | ||
disabled?: boolean; | ||
} | ||
|
||
const AddEventFilterComponent: React.FC<AddEventFilterProps> = ({ onClick, disabled }) => { | ||
return ( | ||
<EuiContextMenuItem | ||
key="add-event-filter-menu-item" | ||
aria-label={i18n.ACTION_ADD_EVENT_FILTER} | ||
data-test-subj="add-event-filter-menu-item" | ||
id="addEventFilter" | ||
onClick={onClick} | ||
disabled={disabled} | ||
> | ||
<EuiText data-test-subj="addEventFilterButton" size="m"> | ||
{i18n.ACTION_ADD_EVENT_FILTER} | ||
</EuiText> | ||
</EuiContextMenuItem> | ||
); | ||
}; | ||
|
||
export const AddEventFilter = React.memo(AddEventFilterComponent); |
Oops, something went wrong.