-
- {calculated.total} {pluralize('rule', calculated.total)}
-
- {!!statsComponents.length && (
+
+ {hasStats && (
+
+ {statsComponents}
+
+ )}
+ {evaluationInterval && (
<>
- :
- {statsComponents.reduce(
- (prev, curr, idx) =>
- prev.length
- ? [
- prev,
-
- ,
- ,
- curr,
- ]
- : [curr],
- []
- )}
+ |
+
>
)}
-
+
);
};
+
+function ruleHasError(rule: CombinedRule) {
+ return rule.promRule?.health === 'err' || rule.promRule?.health === 'error';
+}
diff --git a/public/app/features/alerting/unified/components/rules/RulesGroup.tsx b/public/app/features/alerting/unified/components/rules/RulesGroup.tsx
index 2d75fdcf86b..9924f6fbe73 100644
--- a/public/app/features/alerting/unified/components/rules/RulesGroup.tsx
+++ b/public/app/features/alerting/unified/components/rules/RulesGroup.tsx
@@ -3,6 +3,7 @@ import pluralize from 'pluralize';
import React, { FC, useEffect, useState } from 'react';
import { GrafanaTheme2 } from '@grafana/data';
+import { Stack } from '@grafana/experimental';
import { logInfo } from '@grafana/runtime';
import { Badge, ConfirmModal, HorizontalGroup, Icon, Spinner, Tooltip, useStyles2 } from '@grafana/ui';
import { useDispatch } from 'app/types';
@@ -213,12 +214,22 @@ export const RulesGroup: FC