Alerting: Adds contact point sorting and searching (#77390)

This commit is contained in:
Gilles De Mey
2023-11-07 11:05:12 +01:00
committed by GitHub
parent 60546a9f5a
commit be436ec6f6
11 changed files with 233 additions and 80 deletions

View File

@@ -65,17 +65,19 @@ const fakeResponse: PromRulesResponse = {
const server = setupMswServer();
mockPromRulesApiResponse(server, fakeResponse);
const originRule: RulerGrafanaRuleDTO = mockRulerGrafanaRule(
{
for: '1m',
labels: { severity: 'critical', region: 'nasa' },
annotations: { [Annotation.summary]: 'This is a very important alert rule' },
},
{ uid: 'grafana-rule-1', title: 'First Grafana Rule', data: [] }
);
mockRulerRulesApiResponse(server, 'grafana', {
'folder-one': [{ name: 'group1', interval: '20s', rules: [originRule] }],
beforeEach(() => {
mockPromRulesApiResponse(server, fakeResponse);
const originRule: RulerGrafanaRuleDTO = mockRulerGrafanaRule(
{
for: '1m',
labels: { severity: 'critical', region: 'nasa' },
annotations: { [Annotation.summary]: 'This is a very important alert rule' },
},
{ uid: 'grafana-rule-1', title: 'First Grafana Rule', data: [] }
);
mockRulerRulesApiResponse(server, 'grafana', {
'folder-one': [{ name: 'group1', interval: '20s', rules: [originRule] }],
});
});
const defaultOptions: UnifiedAlertListOptions = {