Public Dashboards: Usage Insights (#52768)

This commit is contained in:
owensmallwood
2022-08-10 14:14:48 -03:00
committed by GitHub
parent 5e4d5eb14b
commit dc23643bee
15 changed files with 217 additions and 0 deletions
+6
View File
@@ -79,6 +79,11 @@ func (api *Api) GetPublicDashboard(c *models.ReqContext) response.Response {
return handleDashboardErr(http.StatusInternalServerError, "Failed to get public dashboard", err)
}
pubDash, err := api.PublicDashboardService.GetPublicDashboardConfig(c.Req.Context(), dash.OrgId, dash.Uid)
if err != nil {
return handleDashboardErr(http.StatusInternalServerError, "Failed to get public dashboard config", err)
}
meta := dtos.DashboardMeta{
Slug: dash.Slug,
Type: models.DashTypeDB,
@@ -93,6 +98,7 @@ func (api *Api) GetPublicDashboard(c *models.ReqContext) response.Response {
IsFolder: false,
FolderId: dash.FolderId,
PublicDashboardAccessToken: accessToken,
PublicDashboardUID: pubDash.Uid,
}
dto := dtos.DashboardFullWithMeta{Meta: meta, Dashboard: dash.Data}