Alerting: Use db pagination for prometheus api
This reintroduces database pagination for the Prometheus API for rules. Follow up for #109558 to use the new pagination format. Note: This changes the sort-order to use `NamespaceUID` instead of the fully qualified Folder path. This also changes the cursor format to use the `NamespaceUID` instead of the Folder path and to be in a reverisble format.
This commit is contained in:
committed by
Moustafa Baiou
parent
ed2dfd9885
commit
effc887b08
@@ -30,7 +30,7 @@ import (
|
||||
|
||||
type RuleStoreReader interface {
|
||||
GetUserVisibleNamespaces(context.Context, int64, identity.Requester) (map[string]*folder.Folder, error)
|
||||
ListAlertRulesStore
|
||||
ListAlertRulesStoreV2
|
||||
}
|
||||
|
||||
type RuleGroupAccessControlService interface {
|
||||
@@ -292,7 +292,7 @@ func (srv PrometheusSrv) RouteGetRuleStatuses(c *contextmodel.ReqContext) respon
|
||||
return response.JSON(ruleResponse.HTTPStatusCode(), ruleResponse)
|
||||
}
|
||||
|
||||
ruleResponse = PrepareRuleGroupStatuses(
|
||||
ruleResponse = PrepareRuleGroupStatusesV2(
|
||||
srv.log,
|
||||
srv.store,
|
||||
RuleGroupStatusesOptions{
|
||||
|
||||
Reference in New Issue
Block a user