Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import { alertURL } from '@console/internal/components/monitoring/utils';
import { getAlertActions } from '@console/internal/components/notification-drawer';
import { ExternalLink } from '@console/internal/components/utils';
import { Timestamp } from '@console/internal/components/utils/timestamp';
import { RedExclamationCircleIcon, YellowExclamationTriangleIcon } from '../../status/icons';
import {
RedExclamationCircleIcon,
BlueInfoCircleIcon,
YellowExclamationTriangleIcon,
} from '../../status/icons';
import {
getAlertSeverity,
getAlertMessage,
Expand All @@ -19,12 +23,24 @@ import {
getAlertName,
} from './alert-utils';

const CriticalIcon = () => <RedExclamationCircleIcon title="Critical" />;
const WarningIcon = () => <YellowExclamationTriangleIcon title="Warning" />;
const CriticalIcon = () => {
const { t } = useTranslation();
return <RedExclamationCircleIcon title={t('public~Critical')} />;
};
const InfoIcon = () => {
const { t } = useTranslation();
return <BlueInfoCircleIcon title={t('public~Info')} />;
};
const WarningIcon = () => {
const { t } = useTranslation();
return <YellowExclamationTriangleIcon title={t('public~Warning')} />;
};
const getSeverityIcon = (severity: string) => {
switch (severity) {
case 'critical':
return CriticalIcon;
case 'info':
return InfoIcon;
case 'warning':
default:
return WarningIcon;
Expand Down
2 changes: 2 additions & 0 deletions frontend/public/locales/en/public.json
Original file line number Diff line number Diff line change
Expand Up @@ -1799,6 +1799,8 @@
"{{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.",
"prometheusBaseURL not set": "prometheusBaseURL not set",
"alertManagerBaseURL not set": "alertManagerBaseURL not set",
"Critical": "Critical",
"Info": "Info",
"Loading {{title}} status": "Loading {{title}} status",
"Waiting for the build": "Waiting for the build",
"graph timespan": "graph timespan",
Expand Down