The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/public/app/features/alerting/unified/mocks/server/handlers/alertRules.ts

16 lines
507 B

import { http, HttpResponse } from 'msw';
export const MOCK_GRAFANA_ALERT_RULE_TITLE = 'Test alert';
const alertRuleDetailsHandler = () =>
http.get<{ folderUid: string }>(`/api/ruler/:ruler/api/v1/rule/:uid`, () => {
// TODO: Scaffold out alert rule response logic as this endpoint is used more in tests
return HttpResponse.json({
grafana_alert: {
title: MOCK_GRAFANA_ALERT_RULE_TITLE,
},
});
});
const handlers = [alertRuleDetailsHandler()];
export default handlers;