mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Move ReqContext to contexthandler service (#62102)
* Chore: Move ReqContext to contexthandler service * Rename package to contextmodel * Generate ngalert files * Remove unused imports
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
|
||||
"github.com/grafana/grafana/pkg/api/response"
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model"
|
||||
apimodels "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
|
||||
"github.com/grafana/grafana/pkg/util/ticker"
|
||||
|
||||
@@ -305,12 +305,12 @@ func (m *OrgRegistries) RemoveOrgRegistry(org int64) {
|
||||
func Instrument(
|
||||
method,
|
||||
path string,
|
||||
action func(*models.ReqContext) response.Response,
|
||||
action func(*contextmodel.ReqContext) response.Response,
|
||||
metrics *API,
|
||||
) web.Handler {
|
||||
normalizedPath := MakeLabelValue(path)
|
||||
|
||||
return func(c *models.ReqContext) {
|
||||
return func(c *contextmodel.ReqContext) {
|
||||
start := time.Now()
|
||||
res := action(c)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user