Skip to content

Commit

Permalink
Patch missing detector_id with data already on UI (opensearch-project…
Browse files Browse the repository at this point in the history
…#328) (opensearch-project#331)

* [FEATURE] Detector must have at least one alert set opensearch-project#288

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

* [FEATURE] Patch bad detector data for alerts opensearch-project#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]>
Signed-off-by: AWSHurneyt <[email protected]>
  • Loading branch information
2 people authored and AWSHurneyt committed Oct 12, 2023
1 parent 77760cd commit f6a0b8d
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 f6a0b8d

Please sign in to comment.