From f6a0b8d7a200aa9985b21951179fc8ff80ad0377 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 11 Jan 2023 05:22:20 +0530 Subject: [PATCH] Patch missing detector_id with data already on UI (#328) (#331) * [FEATURE] Detector must have at least one alert set #288 Signed-off-by: Jovan Cvetkovic * [FEATURE] Patch bad detector data for alerts #326 Signed-off-by: Jovan Cvetkovic Signed-off-by: Jovan Cvetkovic (cherry picked from commit 5eeb983322d9a242cf2ad5c5ab9fdddae3e585a9) Co-authored-by: Jovan Cvetkovic Signed-off-by: AWSHurneyt --- public/pages/Alerts/containers/Alerts/Alerts.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/public/pages/Alerts/containers/Alerts/Alerts.tsx b/public/pages/Alerts/containers/Alerts/Alerts.tsx index d352c367f..b2b9925d1 100644 --- a/public/pages/Alerts/containers/Alerts/Alerts.tsx +++ b/public/pages/Alerts/containers/Alerts/Alerts.tsx @@ -304,6 +304,7 @@ class Alerts extends Component { if (alertsRes.ok) { const detectorAlerts = alertsRes.response.alerts.map((alert) => { const detector = detectors[id]; + if (!alert.detector_id) alert.detector_id = id; return { ...alert, detectorName: detector.name }; }); alerts = alerts.concat(detectorAlerts);