Alerting: Contact points v2 – part 1 (#70643)

This commit is contained in:
Gilles De Mey
2023-07-04 12:47:19 +02:00
committed by GitHub
parent 3640bf77ba
commit 368afc211c
8 changed files with 412 additions and 110 deletions

View File

@@ -0,0 +1,23 @@
/**
* This hook will combine data from both the Alertmanager config
* and (if available) it will also fetch the status from the Grafana Managed status endpoint
*/
import { NotifierType, NotifierStatus } from 'app/types';
// A Contact Point has 1 or more integrations
// each integration can have additional metadata assigned to it
export interface ContactPoint<T extends Notifier> {
notifiers: T[];
}
interface Notifier {
type: NotifierType;
}
// Grafana Managed contact points have receivers with additional diagnostics
export interface NotifierWithDiagnostics extends Notifier {
status: NotifierStatus;
}
export function useContactPoints(AlertManagerSourceName: string) {}