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:
1 parent
8379a29b53
commit
6c5a573772
180 files changed
+1208
-1182
No files matched your search
@@ -9,12 +9,12 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/grafana/grafana/pkg/api/pluginproxy"
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
contextmodel "github.com/grafana/grafana/pkg/services/contexthandler/model"
|
||||
"github.com/grafana/grafana/pkg/services/pluginsettings"
|
||||
"github.com/grafana/grafana/pkg/web"
|
||||
)
|
||||
|
||||
func (hs *HTTPServer) ProxyPluginRequest(c *models.ReqContext) {
|
||||
func (hs *HTTPServer) ProxyPluginRequest(c *contextmodel.ReqContext) {
|
||||
var once sync.Once
|
||||
var pluginProxyTransport *http.Transport
|
||||
once.Do(func() {
|
||||
@@ -63,6 +63,6 @@ func extractProxyPath(originalRawPath string) string {
|
||||
return pluginProxyPathRegexp.ReplaceAllString(originalRawPath, "")
|
||||
}
|
||||
|
||||
func getProxyPath(c *models.ReqContext) string {
|
||||
func getProxyPath(c *contextmodel.ReqContext) string {
|
||||
return extractProxyPath(c.Req.URL.EscapedPath())
|
||||
}
|
||||
Reference in new issue
Block a user