From 5eeb983322d9a242cf2ad5c5ab9fdddae3e585a9 Mon Sep 17 00:00:00 2001 From: Jovan Cvetkovic Date: Wed, 11 Jan 2023 00:17:44 +0100 Subject: [PATCH] Patch missing detector_id with data already on UI (#328) * [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 --- 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);