Переглянути джерело

Merge pull request #15706 from grafana/15656-playlists-with-tags-rebased

wip: Fix playlists "by tags"
Torkel Ödegaard 6 роки тому
батько
коміт
b4df0e73cd
2 змінених файлів з 3 додано та 0 видалено
  1. 2 0
      pkg/api/playlist_play.go
  2. 1 0
      pkg/services/search/models.go

+ 2 - 0
pkg/api/playlist_play.go

@@ -52,8 +52,10 @@ func populateDashboardsByTag(orgID int64, signedInUser *m.SignedInUser, dashboar
 			for _, item := range searchQuery.Result {
 				result = append(result, dtos.PlaylistDashboard{
 					Id:    item.Id,
+					Slug:  item.Slug,
 					Title: item.Title,
 					Uri:   item.Uri,
+					Url:   m.GetDashboardUrl(item.Uid, item.Slug),
 					Order: dashboardTagOrder[tag],
 				})
 			}

+ 1 - 0
pkg/services/search/models.go

@@ -17,6 +17,7 @@ type Hit struct {
 	Title       string   `json:"title"`
 	Uri         string   `json:"uri"`
 	Url         string   `json:"url"`
+	Slug        string   `json:"slug"`
 	Type        HitType  `json:"type"`
 	Tags        []string `json:"tags"`
 	IsStarred   bool     `json:"isStarred"`