Live: Simplify live interface (#33196)

This commit is contained in:
Ryan McKinley
2021-04-23 14:21:38 -07:00
committed by GitHub
parent 1dd9e9b184
commit 693915de35
21 changed files with 405 additions and 382 deletions

View File

@@ -456,7 +456,7 @@ func (g *GrafanaLive) HandleHTTPPublish(ctx *models.ReqContext, cmd dtos.LivePub
return response.Error(http.StatusBadRequest, "Bad channel address", nil)
}
logger.Debug("Publish API cmd", "user", ctx.SignedInUser.UserId, "cmd", cmd)
logger.Debug("Publish API cmd", "user", ctx.SignedInUser.UserId, "channel", cmd.Channel)
channelHandler, addr, err := g.GetChannelHandler(ctx.SignedInUser, cmd.Channel)
if err != nil {

View File

@@ -5,9 +5,10 @@ import (
"strings"
)
// StableSchemaFromValues assumes stable
func StableSchemaFromValues(values url.Values) bool {
key := "gf_live_stable_schema"
return strings.ToLower(values.Get(key)) == "true" || values.Get(key) == "1"
return !(strings.ToLower(values.Get(key)) == "false" || values.Get(key) == "0")
}
func FrameFormatFromValues(values url.Values) string {