Metrictank: fix bundled dashboard (#21209)

* update metrictank dashboard

* Restored dashboard datasource variable, and improved error handling in the import api handler

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
Ryan McKinleyandTorkel Ödegaard authored and Torkel Ödegaard committed 2019-12-20 11:42:47 +01:00
1 parent 05d831df29
commit 104c2e3636
3 files changed
+48 -54

No files matched your search

+1 -2
View File
@@ -179,7 +179,6 @@ func GetPluginMarkdown(c *m.ReqContext) Response {
}
func ImportDashboard(c *m.ReqContext, apiCmd dtos.ImportDashboardCommand) Response {
cmd := plugins.ImportDashboardCommand{
OrgId: c.OrgId,
User: c.SignedInUser,
@@ -192,7 +191,7 @@ func ImportDashboard(c *m.ReqContext, apiCmd dtos.ImportDashboardCommand) Respon
}
if err := bus.Dispatch(&cmd); err != nil {
return Error(500, "Failed to import dashboard", err)
return dashboardSaveErrorToApiResponse(err)
}
return JSON(200, cmd.Result)