Alerting: Add endpoint for querying state history (#62166)
* Define endpoint and generate * Wire up and register endpoint * Cleanup, define authorization * Forgot the leading slash * Wire up query and SignedInUser * Wire up timerange query params * Add todo for label queries * Drop comment * Update path to rules subtree
This commit is contained in:
@@ -84,6 +84,7 @@ type API struct {
|
||||
AlertsRouter *sender.AlertsRouter
|
||||
EvaluatorFactory eval.EvaluatorFactory
|
||||
FeatureManager featuremgmt.FeatureToggles
|
||||
Historian Historian
|
||||
|
||||
AppUrl *url.URL
|
||||
}
|
||||
@@ -152,6 +153,11 @@ func (api *API) RegisterAPIEndpoints(m *metrics.API) {
|
||||
muteTimings: api.MuteTimings,
|
||||
alertRules: api.AlertRules,
|
||||
}), m)
|
||||
|
||||
api.RegisterHistoryApiEndpoints(NewStateHistoryApi(&HistorySrv{
|
||||
logger: logger,
|
||||
hist: api.Historian,
|
||||
}), m)
|
||||
}
|
||||
|
||||
func (api *API) Usage(ctx context.Context, scopeParams *quota.ScopeParameters) (*quota.Map, error) {
|
||||
|
||||
Reference in New Issue
Block a user