From 0aec28e276b2b4d059c49fad1fc26a5c84227b58 Mon Sep 17 00:00:00 2001 From: Jackie Han Date: Sun, 9 Jun 2024 20:42:00 -0700 Subject: [PATCH 1/2] fix a MDS related bug on feature anywhere page Signed-off-by: Jackie Han --- public/expressions/overlay_anomalies.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/expressions/overlay_anomalies.ts b/public/expressions/overlay_anomalies.ts index ea701c2c..e55efc48 100644 --- a/public/expressions/overlay_anomalies.ts +++ b/public/expressions/overlay_anomalies.ts @@ -134,7 +134,8 @@ export const overlayAnomaliesFunction = detectorId, startTimeInMillis, endTimeInMillis, - resultIndex + resultIndex, + dataSourceId ); const anomalyLayer = convertAnomaliesToPointInTimeEventsVisLayer( anomalies, From 3150eaadfd35d838356f94c4c651abe4b99319dd Mon Sep 17 00:00:00 2001 From: Jackie Han Date: Mon, 10 Jun 2024 10:03:36 -0700 Subject: [PATCH 2/2] adopt custom result index alias change Signed-off-by: Jackie Han --- public/expressions/helpers.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/expressions/helpers.ts b/public/expressions/helpers.ts index c11ace78..9c655a8b 100644 --- a/public/expressions/helpers.ts +++ b/public/expressions/helpers.ts @@ -52,6 +52,9 @@ export const getAnomalies = async ( } ); } else { + if (!resultIndex.endsWith('*')) { + resultIndex += '*'; + } anomalySummaryResponse = await getClient().post( `..${AD_NODE_API.DETECTOR}/results/_search/${resultIndex}/true/${dataSourceId}`, {