Skip to content

Commit

Permalink
[BUG] Change colors for Alerts STATUS chart opensearch-project#299
Browse files Browse the repository at this point in the history
[BUG] Change color for Alerts SEVERITY chart opensearch-project#300
[BUG] Change color for Finding RULE SEVERITY chart opensearch-project#301

Signed-off-by: Jovan Cvetkovic <[email protected]>
  • Loading branch information
jovancvetkovic3006 committed Jan 10, 2023
1 parent d820ee8 commit a37f54f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions public/pages/Alerts/containers/Alerts/Alerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import { AlertFlyout } from '../../components/AlertFlyout/AlertFlyout';
import { FindingsService, RuleService, OpenSearchService } from '../../../../services';
import { Detector } from '../../../../../models/interfaces';
import { parseAlertSeverityToOption } from '../../../CreateDetector/components/ConfigureAlerts/utils/helpers';
import { DISABLE_ACKNOWLEDGED_ALERT_HELP_TEXT, severityOptions } from '../../utils/constants';
import { DISABLE_ACKNOWLEDGED_ALERT_HELP_TEXT } from '../../utils/constants';
import {
capitalizeFirstLetter,
createSelectComponent,
Expand Down Expand Up @@ -304,10 +304,7 @@ class Alerts extends Component<AlertsProps, AlertsState> {
if (alertsRes.ok) {
const detectorAlerts = alertsRes.response.alerts.map((alert) => {
const detector = detectors[id];

// localize alert severity based on severityOptions
const severity = { ...severityOptions }[alert.severity]?.text;
return { ...alert, detectorName: detector.name, severity };
return { ...alert, detectorName: detector.name };
});
alerts = alerts.concat(detectorAlerts);
} else {
Expand Down

0 comments on commit a37f54f

Please sign in to comment.