dashboards: add url property to dashboard meta and search api responses

#7883
This commit is contained in:
Marcus Efraimsson
2018-01-30 15:24:14 +01:00
parent 7ee691dc48
commit 9fb7b887db
7 changed files with 33 additions and 0 deletions

View File

@@ -101,6 +101,12 @@ func GetDashboard(c *middleware.Context) Response {
meta.FolderTitle = query.Result.Title
}
if dash.IsFolder {
meta.Url = m.GetFolderUrl(dash.Uid, dash.Slug)
} else {
meta.Url = m.GetDashboardUrl(dash.Uid, dash.Slug)
}
// make sure db version is in sync with json model version
dash.Data.Set("version", dash.Version)