[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
This commit is contained in:
Bena Kansara 2024-11-05 13:57:32 +01:00 committed by GitHub
parent 03cd302aa2
commit f8c01d41d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -286,7 +286,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,