mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 19:52:35 +08:00
AlertingNG: POC of evaluator under feature flag. (#27922)
* New feature toggle for enabling alerting NG * Initial commit * Modify evaluate alert API request * Check for unique labels in alert execution result dataframes * Remove print statement * Additional minor fixes/comments * Fix lint issues * Add API endpoint for evaluating panel queries * Push missing renaming * add refId for condition to API * add refId for condition to API * switch dashboard based eval to get method * add from/to params to dashboard based eval * add from/to params to eval endpoint Co-authored-by: kyle <kyle@grafana.com>
This commit is contained in:

committed by
GitHub

parent
3928d0c531
commit
4acbcd7053
@ -351,6 +351,13 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
alertsRoute.Get("/states-for-dashboard", Wrap(GetAlertStatesForDashboard))
|
||||
})
|
||||
|
||||
if hs.Cfg.IsNgAlertEnabled() {
|
||||
apiRoute.Group("/alert-definitions", func(alertDefinitions routing.RouteRegister) {
|
||||
alertDefinitions.Get("/eval/:dashboardID/:panelID/:refID", reqEditorRole, Wrap(hs.AlertDefinitionEval))
|
||||
alertDefinitions.Post("/eval", reqEditorRole, bind(dtos.EvalAlertConditionsCommand{}), Wrap(hs.ConditionsEval))
|
||||
})
|
||||
}
|
||||
|
||||
apiRoute.Get("/alert-notifiers", reqEditorRole, Wrap(GetAlertNotifiers))
|
||||
|
||||
apiRoute.Group("/alert-notifications", func(alertNotifications routing.RouteRegister) {
|
||||
|
Reference in New Issue
Block a user