mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 08:02:34 +08:00
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:

committed by
Torkel Ödegaard

parent
05d831df29
commit
104c2e3636
@ -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)
|
||||
|
Reference in New Issue
Block a user