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:
idafurjes
2023-01-27 08:50:36 +01:00
committed by GitHub
parent 8379a29b53
commit 6c5a573772
180 changed files with 1208 additions and 1182 deletions

View File

@@ -22,6 +22,7 @@ import (
"github.com/grafana/grafana/pkg/models"
acmock "github.com/grafana/grafana/pkg/services/accesscontrol/mock"
"github.com/grafana/grafana/pkg/services/alerting"
contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model"
"github.com/grafana/grafana/pkg/services/dashboards"
"github.com/grafana/grafana/pkg/services/dashboards/database"
dashboardservice "github.com/grafana/grafana/pkg/services/dashboards/service"
@@ -258,7 +259,7 @@ func getCreateCommandWithModel(folderID int64, name string, kind models.LibraryE
type scenarioContext struct {
ctx *web.Context
service *LibraryElementService
reqContext *models.ReqContext
reqContext *contextmodel.ReqContext
user user.SignedInUser
folder *folder.Folder
initialResult libraryElementResult
@@ -468,7 +469,7 @@ func testScenario(t *testing.T, desc string, fn func(t *testing.T, sc scenarioCo
ctx: &webCtx,
service: &service,
sqlStore: sqlStore,
reqContext: &models.ReqContext{
reqContext: &contextmodel.ReqContext{
Context: &webCtx,
SignedInUser: &usr,
},