Skip to content

Commit 970d12e

Browse files
Merge pull request #15052 from rhamilto/OCPBUGS-55806
OCPBUGS-55806: fix bug where AlertItem is missing info icon
2 parents 19b2eb1 + e9bdf09 commit 970d12e

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

frontend/packages/console-shared/src/components/dashboard/status-card/AlertItem.tsx

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ import { alertURL } from '@console/internal/components/monitoring/utils';
99
import { getAlertActions } from '@console/internal/components/notification-drawer';
1010
import { ExternalLink } from '@console/internal/components/utils';
1111
import { Timestamp } from '@console/internal/components/utils/timestamp';
12-
import { RedExclamationCircleIcon, YellowExclamationTriangleIcon } from '../../status/icons';
12+
import {
13+
RedExclamationCircleIcon,
14+
BlueInfoCircleIcon,
15+
YellowExclamationTriangleIcon,
16+
} from '../../status/icons';
1317
import {
1418
getAlertSeverity,
1519
getAlertMessage,
@@ -19,12 +23,24 @@ import {
1923
getAlertName,
2024
} from './alert-utils';
2125

22-
const CriticalIcon = () => <RedExclamationCircleIcon title="Critical" />;
23-
const WarningIcon = () => <YellowExclamationTriangleIcon title="Warning" />;
26+
const CriticalIcon = () => {
27+
const { t } = useTranslation();
28+
return <RedExclamationCircleIcon title={t('public~Critical')} />;
29+
};
30+
const InfoIcon = () => {
31+
const { t } = useTranslation();
32+
return <BlueInfoCircleIcon title={t('public~Info')} />;
33+
};
34+
const WarningIcon = () => {
35+
const { t } = useTranslation();
36+
return <YellowExclamationTriangleIcon title={t('public~Warning')} />;
37+
};
2438
const getSeverityIcon = (severity: string) => {
2539
switch (severity) {
2640
case 'critical':
2741
return CriticalIcon;
42+
case 'info':
43+
return InfoIcon;
2844
case 'warning':
2945
default:
3046
return WarningIcon;

frontend/public/locales/en/public.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1797,6 +1797,8 @@
17971797
"{{pluginName}} might have violated the Console Content Security Policy. Refer to the browser's console logs for details.": "{{pluginName}} might have violated the Console Content Security Policy. Refer to the browser's console logs for details.",
17981798
"prometheusBaseURL not set": "prometheusBaseURL not set",
17991799
"alertManagerBaseURL not set": "alertManagerBaseURL not set",
1800+
"Critical": "Critical",
1801+
"Info": "Info",
18001802
"Loading {{title}} status": "Loading {{title}} status",
18011803
"Waiting for the build": "Waiting for the build",
18021804
"graph timespan": "graph timespan",

0 commit comments

Comments
 (0)