diff --git a/public/app/features/alerting/unified/mocks.ts b/public/app/features/alerting/unified/mocks.ts index 3683e9f56ba..458d97df016 100644 --- a/public/app/features/alerting/unified/mocks.ts +++ b/public/app/features/alerting/unified/mocks.ts @@ -543,6 +543,7 @@ export const somePromRules = (dataSourceName = 'Prometheus'): RuleNamespace[] => groups: [mockPromRuleGroup({ name: 'group3', rules: [mockPromAlertingRule({ name: 'alert3' })] })], }, ]; + export const someRulerRules: RulerRulesConfigDTO = { namespace1: [ mockRulerRuleGroup({ name: 'group1', rules: [mockRulerAlertingRule({ alert: 'alert1' })] }), @@ -551,6 +552,23 @@ export const someRulerRules: RulerRulesConfigDTO = { namespace2: [mockRulerRuleGroup({ name: 'group3', rules: [mockRulerAlertingRule({ alert: 'alert3' })] })], }; +export const getPotentiallyPausedRulerRules: (isPaused: boolean) => RulerRulesConfigDTO = (isPaused) => ({ + namespacePaused: [ + mockRulerRuleGroup({ + name: 'groupPaused', + rules: [mockGrafanaRulerRule({ title: 'paused alert', is_paused: isPaused })], + }), + ], +}); + +export const pausedPromRules = (dataSourceName = 'Prometheus'): RuleNamespace[] => [ + { + dataSourceName, + name: 'namespacePaused', + groups: [mockPromRuleGroup({ name: 'groupPaused', rules: [mockPromAlertingRule({ name: 'paused alert' })] })], + }, +]; + export const mockCombinedRule = (partial?: Partial): CombinedRule => ({ name: 'mockRule', query: 'expr',