From 6a3b09ff3bab6a2219737493def7e68ba52119b9 Mon Sep 17 00:00:00 2001 From: Bena Kansara <69037875+benakansara@users.noreply.github.com> Date: Tue, 5 Nov 2024 13:57:32 +0100 Subject: [PATCH] [Observability] [Alerts table] Fix cannot display alerts error (#198914) Resolves https://github.com/elastic/kibana/issues/198912 ### Testing - Create ES query rule in Observability - Open Alert flyout of the ES query alert - Verify that Alert flyout opens as expected (cherry picked from commit f8c01d41d2dc6c4c4d096c485b48dc7decafd873) --- .../alert_overview/helpers/map_rules_params_with_flyout.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/observability_solution/observability/public/components/alert_overview/helpers/map_rules_params_with_flyout.ts b/x-pack/plugins/observability_solution/observability/public/components/alert_overview/helpers/map_rules_params_with_flyout.ts index fce4bd35dbdee..2ecda6419a06f 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/alert_overview/helpers/map_rules_params_with_flyout.ts +++ b/x-pack/plugins/observability_solution/observability/public/components/alert_overview/helpers/map_rules_params_with_flyout.ts @@ -269,7 +269,7 @@ export const mapRuleParamsWithFlyout = (alert: TopAlert): FlyoutThresholdData[] const { thresholdComparator, threshold } = ruleParams as EsQueryRuleParams; const ESQueryFlyoutMap = { observedValue: [alert.fields[ALERT_EVALUATION_VALUE]], - threshold: threshold.join(' AND '), + threshold: [threshold].flat().join(' AND '), comparator: thresholdComparator, pctAboveThreshold: getPctAboveThreshold( threshold,