- {rulerRuleRequests && (
+ {rulerRuleRequests && !hasSomeNoRecordingRules && This group does not contain alert rules.
}
+ {rulerRuleRequests && hasSomeNoRecordingRules && (
<>
List of rules that belong to this group
#Evaluations column represents the number of evaluations needed before alert starts firing.
-
+
>
)}
>
diff --git a/public/app/features/alerting/unified/mocks.ts b/public/app/features/alerting/unified/mocks.ts
index 2148209f3f7..517f4142be5 100644
--- a/public/app/features/alerting/unified/mocks.ts
+++ b/public/app/features/alerting/unified/mocks.ts
@@ -41,6 +41,7 @@ import {
PromRuleType,
RulerAlertingRuleDTO,
RulerGrafanaRuleDTO,
+ RulerRecordingRuleDTO,
RulerRuleGroupDTO,
RulerRulesConfigDTO,
} from 'app/types/unified-alerting-dto';
@@ -134,6 +135,18 @@ export const mockRulerAlertingRule = (partial: Partial = {
...partial,
});
+export const mockRulerRecordingRule = (partial: Partial = {}): RulerAlertingRuleDTO => ({
+ alert: 'alert1',
+ expr: 'up = 1',
+ labels: {
+ severity: 'warning',
+ },
+ annotations: {
+ summary: 'test alert',
+ },
+ ...partial,
+});
+
export const mockRulerRuleGroup = (partial: Partial = {}): RulerRuleGroupDTO => ({
name: 'group1',
rules: [mockRulerAlertingRule()],