From 4bf2089dd385f462ceae572fa411f6e179bcb019 Mon Sep 17 00:00:00 2001 From: Xavier Mouligneau Date: Thu, 21 Sep 2023 14:47:54 -0400 Subject: [PATCH] fix esQuery registration view in app --- .../public/rule_types/es_query/index.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/x-pack/plugins/stack_alerts/public/rule_types/es_query/index.ts b/x-pack/plugins/stack_alerts/public/rule_types/es_query/index.ts index 81aeb83c2d75b..7ffd10adce528 100644 --- a/x-pack/plugins/stack_alerts/public/rule_types/es_query/index.ts +++ b/x-pack/plugins/stack_alerts/public/rule_types/es_query/index.ts @@ -59,4 +59,20 @@ function registerNavigation(alerting: AlertingSetup) { return; } ); + alerting.registerNavigation( + 'logs', + ES_QUERY_ID, + (rule: SanitizedRule>) => { + if (isSearchSourceRule(rule.params)) return `/app/discover#/viewAlert/${rule.id}`; + return; + } + ); + alerting.registerNavigation( + 'infrastructure', + ES_QUERY_ID, + (rule: SanitizedRule>) => { + if (isSearchSourceRule(rule.params)) return `/app/discover#/viewAlert/${rule.id}`; + return; + } + ); }