Skip to content

Commit e2ffbe3

Browse files
committed
OCPBUGS-55806: fix bug where AlertItem is missing info icon
1 parent 1d84d82 commit e2ffbe3

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed

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

+19-3
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

+8-5
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,12 @@
453453
"AppliedClusterResourceQuotas": "AppliedClusterResourceQuotas",
454454
"No AppliedClusterResourceQuotas": "No AppliedClusterResourceQuotas",
455455
"Utilization": "Utilization",
456+
"{{numCores}} cores": "{{numCores}} cores",
457+
"Search by label...": "Search by label...",
458+
"No Pods found": "No Pods found",
459+
"Label": "Label",
460+
"Column management": "Column management",
461+
"Manage columns": "Manage columns",
456462
"This temporary pod has a modified entrypoint command to debug a failing container. The pod will be deleted when the terminal window is closed.": "This temporary pod has a modified entrypoint command to debug a failing container. The pod will be deleted when the terminal window is closed.",
457463
"The debug pod failed.": "The debug pod failed.",
458464
"Debug {{name}}": "Debug {{name}}",
@@ -610,13 +616,9 @@
610616
"Thank you for your interest in user research. You have been added to our mailing list.": "Thank you for your interest in user research. You have been added to our mailing list.",
611617
"User Research Team": "User Research Team",
612618
"We never share your personal information, and you can opt out at any time.": "We never share your personal information, and you can opt out at any time.",
613-
"Label": "Label",
614619
"Clear all filters": "Clear all filters",
615620
"Filter": "Filter",
616-
"Search by label...": "Search by label...",
617621
"Search by name...": "Search by name...",
618-
"Manage columns": "Manage columns",
619-
"Column management": "Column management",
620622
"Your feedback is valuable in enhancing our services. To help us improve, we seek your consent to collect anonymized telemetry data. <2>Privacy statement</2>.": "Your feedback is valuable in enhancing our services. To help us improve, we seek your consent to collect anonymized telemetry data. <2>Privacy statement</2>.",
621623
"Accept": "Accept",
622624
"Deny": "Deny",
@@ -1139,7 +1141,6 @@
11391141
"Ready": "Ready",
11401142
"Owner": "Owner",
11411143
"IP address": "IP address",
1142-
"{{numCores}} cores": "{{numCores}} cores",
11431144
"since <1></1>": "since <1></1>",
11441145
"at <1></1> ": "at <1></1> ",
11451146
"with exit code {{exitCode}} ": "with exit code {{exitCode}} ",
@@ -1799,6 +1800,8 @@
17991800
"{{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.",
18001801
"prometheusBaseURL not set": "prometheusBaseURL not set",
18011802
"alertManagerBaseURL not set": "alertManagerBaseURL not set",
1803+
"Critical": "Critical",
1804+
"Info": "Info",
18021805
"Loading {{title}} status": "Loading {{title}} status",
18031806
"Waiting for the build": "Waiting for the build",
18041807
"graph timespan": "graph timespan",

0 commit comments

Comments
 (0)