Skip to content

Commit

Permalink
Patch missing detector_id with data already on UI (#328) (#331)
Browse files Browse the repository at this point in the history
* [FEATURE] Detector must have at least one alert set #288

Signed-off-by: Jovan Cvetkovic <[email protected]>

* [FEATURE] Patch bad detector data for alerts #326

Signed-off-by: Jovan Cvetkovic <[email protected]>

Signed-off-by: Jovan Cvetkovic <[email protected]>
(cherry picked from commit 5eeb983)

Co-authored-by: Jovan Cvetkovic <[email protected]>
  • Loading branch information
1 parent 4c5f5dc commit fcffcaa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions public/pages/Alerts/containers/Alerts/Alerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ class Alerts extends Component<AlertsProps, AlertsState> {
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);
Expand Down

0 comments on commit fcffcaa

Please sign in to comment.