Alerting: Receivers API (read only endpoints) (#81751)
* Add single receiver method * Add receiver permissions * Add single/multi GET endpoints for receivers * Remove stable tag from time intervals See end of PR description here: https://github.com/grafana/grafana/pull/81672
This commit is contained in:
@@ -64,6 +64,7 @@ type API struct {
|
||||
StateManager *state.Manager
|
||||
AccessControl ac.AccessControl
|
||||
Policies *provisioning.NotificationPolicyService
|
||||
ReceiverService *notifier.ReceiverService
|
||||
ContactPointService *provisioning.ContactPointService
|
||||
Templates *provisioning.TemplateService
|
||||
MuteTimings *provisioning.MuteTimingService
|
||||
@@ -152,7 +153,11 @@ func (api *API) RegisterAPIEndpoints(m *metrics.API) {
|
||||
hist: api.Historian,
|
||||
}), m)
|
||||
|
||||
api.RegisterNotificationsApiEndpoints(NewNotificationsApi(api.MuteTimings), m)
|
||||
api.RegisterNotificationsApiEndpoints(NewNotificationsApi(&NotificationSrv{
|
||||
logger: logger,
|
||||
receiverService: api.ReceiverService,
|
||||
muteTimingService: api.MuteTimings,
|
||||
}), m)
|
||||
|
||||
// Inject upgrade endpoints if legacy alerting is enabled and the feature flag is enabled.
|
||||
if !api.Cfg.UnifiedAlerting.IsEnabled() && api.FeatureManager.IsEnabledGlobally(featuremgmt.FlagAlertingPreviewUpgrade) {
|
||||
|
||||
Reference in New Issue
Block a user