Skip to content

Commit

Permalink
fix open close signal on detail page (elastic#56757) (elastic#56778)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
XavierM and elasticmachine committed Feb 5, 2020
1 parent e23b586 commit 7cfa489
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ const SignalsTableComponent: React.FC<SignalsTableComponentProps> = ({
dataProviders: [],
indexPattern: indexPatterns,
browserFields,
filters: globalFilters,
filters: isEmpty(defaultFilters)
? globalFilters
: [...(defaultFilters ?? []), ...globalFilters],
kqlQuery: globalQuery,
kqlMode: globalQuery.language,
start: from,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const typicalSetStatusSignalByIdsPayload = (): Partial<SignalsStatusRestP
});

export const typicalSetStatusSignalByQueryPayload = (): Partial<SignalsStatusRestParams> => ({
query: { range: { '@timestamp': { gte: 'now-2M', lte: 'now/M' } } },
query: { bool: { filter: { range: { '@timestamp': { gte: 'now-2M', lte: 'now/M' } } } } },
status: 'closed',
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ export const setSignalsStatusRouteDef = (server: ServerFacade): Hapi.ServerRoute
queryObject = { ids: { values: signalIds } };
}
if (query) {
queryObject = query;
queryObject = {
bool: {
filter: query,
},
};
}
try {
return callWithRequest(request, 'updateByQuery', {
Expand Down

0 comments on commit 7cfa489

Please sign in to comment.