mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[EDR Workflows] Remove usage of _source in automated response actions (#162316)
This commit is contained in:
parent
a190b3f2ab
commit
1a300e31bb
3 changed files with 5 additions and 3 deletions
|
@ -124,11 +124,9 @@ export const useGetAutomatedActionResponseList = (
|
|||
)
|
||||
);
|
||||
|
||||
const action = responseData.edges[0]?._source;
|
||||
|
||||
return {
|
||||
action_id: actionId,
|
||||
completedAt: action?.EndpointActions.completed_at,
|
||||
completedAt: responseData.edges[0]?.fields?.['EndpointActions.completed_at']?.[0],
|
||||
isExpired: responseData.isExpired,
|
||||
wasSuccessful: responseData.wasSuccessful,
|
||||
isCompleted: responseData.isCompleted,
|
||||
|
|
|
@ -34,6 +34,7 @@ export const buildResponseActionsQuery = (
|
|||
ignore_unavailable: true,
|
||||
body: {
|
||||
fields,
|
||||
_source: false,
|
||||
query: {
|
||||
bool: {
|
||||
minimum_should_match: 2,
|
||||
|
|
|
@ -13,10 +13,13 @@ export const buildActionResultsQuery = ({
|
|||
actionId,
|
||||
sort,
|
||||
}: ActionResponsesRequestOptions): ISearchRequestParams => {
|
||||
const fields = [{ field: '*' }, { field: 'EndpointActions.*', include_unmapped: true }];
|
||||
const dslQuery = {
|
||||
allow_no_indices: true,
|
||||
index: [ENDPOINT_ACTION_RESPONSES_INDEX],
|
||||
body: {
|
||||
fields,
|
||||
_source: false,
|
||||
size: 1,
|
||||
query: {
|
||||
term: { action_id: actionId },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue