File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
web/src/components/health Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import * as React from 'react';
1414import { useTranslation } from 'react-i18next' ;
1515import { HealthCard } from './health-card' ;
1616import { HealthHeatmap } from './health-heatmap' ;
17- import { ByResource } from './helper' ;
17+ import { ByResource , getAllAlerts } from './helper' ;
1818import { RuleDetails } from './rule-details' ;
1919
2020export interface HealthGlobalProps {
@@ -24,13 +24,14 @@ export interface HealthGlobalProps {
2424
2525export 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 } />
You can’t perform that action at this time.
0 commit comments