Adds signed in user to backend v2 plugins requests (#22584)

closes #12043
This commit is contained in:
Carl Bergquist
2020-03-06 14:37:36 +01:00
committed by GitHub
parent c73a0007c7
commit 1dcfaf25fc
7 changed files with 42 additions and 8 deletions

View File

@ -205,6 +205,7 @@ func ImportDashboard(c *models.ReqContext, apiCmd dtos.ImportDashboardCommand) R
return JSON(200, cmd.Result)
}
// CheckHealth returns the health of a plugin.
// /api/plugins/:pluginId/health
func (hs *HTTPServer) CheckHealth(c *models.ReqContext) Response {
pluginID := c.Params("pluginId")
@ -226,8 +227,9 @@ func (hs *HTTPServer) CheckHealth(c *models.ReqContext) Response {
}
payload := map[string]interface{}{
"status": resp.Status.String(),
"message": resp.Message,
"status": resp.Status.String(),
"message": resp.Message,
"jsonDetails": resp.JSONDetails,
}
if resp.Status != backendplugin.HealthStatusOk {