Skip to content

Commit

Permalink
fix open close signal on detail page (#56757) (#56779)
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierM committed Feb 4, 2020
1 parent 4ad0312 commit 5b0570f
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 5b0570f

Please sign in to comment.