mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 08:18:10 -05:00
Live: cleanup and simple changes (#28028)
This commit is contained in:
+1
-1
@@ -426,7 +426,7 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
|
||||
// Live streaming
|
||||
if hs.Live != nil {
|
||||
r.Any("/live/*", hs.Live.Handler)
|
||||
r.Any("/live/*", hs.Live.WebsocketHandler)
|
||||
}
|
||||
|
||||
// Snapshots
|
||||
|
||||
@@ -31,7 +31,7 @@ type GrafanaLive struct {
|
||||
node *centrifuge.Node
|
||||
|
||||
// The websocket handler
|
||||
Handler interface{}
|
||||
WebsocketHandler interface{}
|
||||
|
||||
// Full channel handler
|
||||
channels map[string]models.ChannelHandler
|
||||
@@ -171,7 +171,7 @@ func InitializeBroker() (*GrafanaLive, error) {
|
||||
WriteBufferSize: 1024,
|
||||
})
|
||||
|
||||
glive.Handler = func(ctx *models.ReqContext) {
|
||||
glive.WebsocketHandler = func(ctx *models.ReqContext) {
|
||||
user := ctx.SignedInUser
|
||||
if user == nil {
|
||||
ctx.Resp.WriteHeader(401)
|
||||
|
||||
Reference in New Issue
Block a user