Commit aa60edd9 by Torkel Ödegaard

Fixed issue with external snapshot publish

parent c4b8a985
...@@ -19,6 +19,7 @@ import ( ...@@ -19,6 +19,7 @@ import (
func CreateDashboardSnapshot(c *middleware.Context, cmd m.CreateDashboardSnapshotCommand) { func CreateDashboardSnapshot(c *middleware.Context, cmd m.CreateDashboardSnapshotCommand) {
if cmd.External { if cmd.External {
createExternalSnapshot(c, cmd) createExternalSnapshot(c, cmd)
return
} }
cmd.Key = util.GetRandomString(32) cmd.Key = util.GetRandomString(32)
...@@ -35,6 +36,7 @@ func CreateDashboardSnapshot(c *middleware.Context, cmd m.CreateDashboardSnapsho ...@@ -35,6 +36,7 @@ func CreateDashboardSnapshot(c *middleware.Context, cmd m.CreateDashboardSnapsho
func createExternalSnapshot(c *middleware.Context, cmd m.CreateDashboardSnapshotCommand) { func createExternalSnapshot(c *middleware.Context, cmd m.CreateDashboardSnapshotCommand) {
metrics.M_Api_Dashboard_Snapshot_External.Inc(1) metrics.M_Api_Dashboard_Snapshot_External.Inc(1)
cmd.External = false
json, _ := json.Marshal(cmd) json, _ := json.Marshal(cmd)
jsonData := bytes.NewBuffer(json) jsonData := bytes.NewBuffer(json)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment