Alerting: API to convert submitted Prometheus rules to GMA (#102231)
* placeholder commit * Complete function in api_convert_prometheus.go * MVP before extensive testing * Cleanup * Updated tests * cleanup * Fix random logs and lint * Remove comment * Fix errors after rebase * Update test * Update swagger * swagger * Refactor to accept groups in body * Fix auth tests and some cleanup * Some cleanup before refactoring * Remove unnecessary fields * Also refactor RouteConvertPrometheusPostRuleGroup * Remove unused code * Rebase + cleanup * Update authorization_test * address comments * Regen swagger files * Remove namespace and group filters * Final comments
This commit is contained in:
@@ -128,7 +128,9 @@ func (api *API) authorize(method, path string) web.Handler {
|
||||
)
|
||||
|
||||
case http.MethodPost + "/api/convert/prometheus/config/v1/rules/{NamespaceTitle}",
|
||||
http.MethodPost + "/api/convert/api/prom/rules/{NamespaceTitle}":
|
||||
http.MethodPost + "/api/convert/api/prom/rules/{NamespaceTitle}",
|
||||
http.MethodPost + "/api/convert/prometheus/config/v1/rules",
|
||||
http.MethodPost + "/api/convert/api/prom/config/v1/rules":
|
||||
eval = ac.EvalAll(
|
||||
ac.EvalPermission(ac.ActionAlertingRuleCreate),
|
||||
ac.EvalPermission(ac.ActionAlertingProvisioningSetStatus),
|
||||
|
||||
Reference in New Issue
Block a user