Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
This commit is contained in:
parent
a5acdf5371
commit
dad2009acd
1 changed files with 5 additions and 6 deletions
|
@ -228,14 +228,13 @@ export const getCombinedFilterQuery = ({
|
||||||
to,
|
to,
|
||||||
filters,
|
filters,
|
||||||
...combineQueriesParams
|
...combineQueriesParams
|
||||||
}: CombineQueries & { from: string; to: string }): string => {
|
}: CombineQueries & { from: string; to: string }): string =>
|
||||||
return replaceStatusField(
|
replaceStatusField(
|
||||||
combineQueries({
|
combineQueries({
|
||||||
...combineQueriesParams,
|
...combineQueriesParams,
|
||||||
filters: [...filters, buildTimeRangeFilter(from, to)],
|
filters: [...filters, buildTimeRangeFilter(from, to)],
|
||||||
})!.filterQuery
|
})?.filterQuery
|
||||||
);
|
);
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function is a temporary patch to prevent queries using old `signal.status` field.
|
* This function is a temporary patch to prevent queries using old `signal.status` field.
|
||||||
|
@ -243,8 +242,8 @@ export const getCombinedFilterQuery = ({
|
||||||
* must be replaced by `ALERT_WORKFLOW_STATUS` field name constant
|
* must be replaced by `ALERT_WORKFLOW_STATUS` field name constant
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
const replaceStatusField = (query: string): string =>
|
const replaceStatusField = (filterQuery?: string): string =>
|
||||||
query.replaceAll('signal.status', ALERT_WORKFLOW_STATUS);
|
filterQuery?.replaceAll('signal.status', ALERT_WORKFLOW_STATUS) ?? '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The CSS class name of a "stateful event", which appears in both
|
* The CSS class name of a "stateful event", which appears in both
|
||||||
|
|
Loading…
Reference in a new issue