Skip to content

Commit 0fc73c2

Browse files
committed
fix no violations found on global
1 parent 79bac45 commit 0fc73c2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

web/src/components/health/health-global.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import * as React from 'react';
1414
import { useTranslation } from 'react-i18next';
1515
import { HealthCard } from './health-card';
1616
import { HealthHeatmap } from './health-heatmap';
17-
import { ByResource } from './helper';
17+
import { ByResource, getAllAlerts } from './helper';
1818
import { RuleDetails } from './rule-details';
1919

2020
export interface HealthGlobalProps {
@@ -24,13 +24,14 @@ export interface HealthGlobalProps {
2424

2525
export const HealthGlobal: React.FC<HealthGlobalProps> = ({ info, isDark }) => {
2626
const { t } = useTranslation('plugin__netobserv-plugin');
27+
const allAlerts = getAllAlerts(info);
2728

2829
return (
2930
<>
3031
<TextContent>
3132
<Text component={TextVariants.h3}>{t('Global rule violations')}</Text>
3233
</TextContent>
33-
{info.score === 0 ? (
34+
{allAlerts.length === 0 ? (
3435
<Bullseye>
3536
<EmptyState>
3637
<EmptyStateIcon icon={CheckCircleIcon} />

0 commit comments

Comments
 (0)