Live: simplify dependencies (#115130)

This commit is contained in:
Ryan McKinley
2025-12-11 13:37:45 +03:00
committed by GitHub
parent 7fe3214f16
commit 9bec62a080
26 changed files with 93 additions and 522 deletions
+3 -2
View File
@@ -5,6 +5,7 @@ import (
"github.com/gorilla/websocket"
"github.com/grafana/grafana/pkg/apimachinery/identity"
"github.com/grafana/grafana/pkg/services/live/convert"
"github.com/grafana/grafana/pkg/services/live/livecontext"
"github.com/grafana/grafana/pkg/services/live/pipeline"
@@ -44,8 +45,8 @@ func (s *PipelinePushHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
return
}
user, ok := livecontext.GetContextSignedUser(r.Context())
if !ok {
user, err := identity.GetRequester(r.Context())
if err != nil {
logger.Error("No user found in context")
rw.WriteHeader(http.StatusInternalServerError)
return
+4 -3
View File
@@ -5,8 +5,9 @@ import (
"time"
"github.com/gorilla/websocket"
liveDto "github.com/grafana/grafana-plugin-sdk-go/live"
liveDto "github.com/grafana/grafana-plugin-sdk-go/live"
"github.com/grafana/grafana/pkg/apimachinery/identity"
"github.com/grafana/grafana/pkg/services/live/convert"
"github.com/grafana/grafana/pkg/services/live/livecontext"
"github.com/grafana/grafana/pkg/services/live/managedstream"
@@ -47,8 +48,8 @@ func (s *Handler) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
return
}
user, ok := livecontext.GetContextSignedUser(r.Context())
if !ok {
user, err := identity.GetRequester(r.Context())
if err != nil {
logger.Error("No user found in context")
rw.WriteHeader(http.StatusInternalServerError)
return