Alerting: Get grafana-managed alert rule by UID (#86845)
* Add auth checks and test * Check user is authorized to view rule and add tests * Change naming * Update Swagger params * Update auth test and swagger gen * Update swagger gen * Change response to GettableExtendedRuleNode * openapi3-gen * Update tests with refactors models pkg
This commit is contained in:
@@ -93,6 +93,10 @@ func (f *RulerApiHandler) handleRouteGetGrafanaRulesConfig(ctx *contextmodel.Req
|
||||
return f.GrafanaRuler.RouteGetRulesConfig(ctx)
|
||||
}
|
||||
|
||||
func (f *RulerApiHandler) handleRouteGetRuleByUID(ctx *contextmodel.ReqContext, ruleUID string) response.Response {
|
||||
return f.GrafanaRuler.RouteGetRuleByUID(ctx, ruleUID)
|
||||
}
|
||||
|
||||
func (f *RulerApiHandler) handleRoutePostNameGrafanaRulesConfig(ctx *contextmodel.ReqContext, conf apimodels.PostableRuleGroupConfig, namespace string) response.Response {
|
||||
payloadType := conf.Type()
|
||||
if payloadType != apimodels.GrafanaBackend {
|
||||
|
||||
Reference in New Issue
Block a user