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:
Moustafa Baiou
2025-08-18 06:18:12 -07:00
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{