diff --git a/pkg/services/search/models.go b/pkg/services/search/models.go index dbd4f21a71e..cf510ed8462 100644 --- a/pkg/services/search/models.go +++ b/pkg/services/search/models.go @@ -15,6 +15,7 @@ type Hit struct { Id int64 `json:"id"` Title string `json:"title"` Uri string `json:"uri"` + Slug string `json:"slug"` Type HitType `json:"type"` Tags []string `json:"tags"` IsStarred bool `json:"isStarred"` diff --git a/pkg/services/sqlstore/dashboard.go b/pkg/services/sqlstore/dashboard.go index af27dad59de..31a42a7b3b3 100644 --- a/pkg/services/sqlstore/dashboard.go +++ b/pkg/services/sqlstore/dashboard.go @@ -260,6 +260,7 @@ func makeQueryResult(query *search.FindPersistedDashboardsQuery, res []Dashboard Id: item.Id, Title: item.Title, Uri: "db/" + item.Slug, + Slug: item.Slug, Type: getHitType(item), FolderId: item.FolderId, FolderTitle: item.FolderTitle, diff --git a/public/app/core/components/search/search_results.html b/public/app/core/components/search/search_results.html index 324654b9815..8cf5505186b 100644 --- a/public/app/core/components/search/search_results.html +++ b/public/app/core/components/search/search_results.html @@ -1,21 +1,21 @@