Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1818691: Monitoring: Use blue circle "info" icon for none severity alerts #4861

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 3 additions & 9 deletions frontend/public/components/monitoring.tsx
Expand Up @@ -213,6 +213,7 @@ const AlertStateDescription = ({ alert }) => {
const severityIcons = {
[AlertSeverities.Critical]: RedExclamationCircleIcon,
[AlertSeverities.Info]: BlueInfoCircleIcon,
[AlertSeverities.None]: BlueInfoCircleIcon,
[AlertSeverities.Warning]: YellowExclamationTriangleIcon,
};

Expand All @@ -228,15 +229,8 @@ const SeverityIcon: React.FC<SeverityIconProps> = ({ label, severity }) => {
);
};

const Severity: React.FC<{ severity?: string }> = ({ severity }) => {
if (_.isNil(severity)) {
return <>-</>;
}
if (severity === AlertSeverities.None) {
return <>None</>;
}
return <SeverityIcon label={_.startCase(severity)} severity={severity} />;
};
const Severity: React.FC<{ severity?: string }> = ({ severity }) =>
_.isNil(severity) ? <>-</> : <SeverityIcon label={_.startCase(severity)} severity={severity} />;

const SeverityCounts: React.FC<{ alerts: Alert[] }> = ({ alerts }) => {
const counts = _.countBy(alerts, (a) => {
Expand Down