Przeglądaj źródła

dashboards: remove slug property in dashboard search responses

Removes slug property in dashboard search responses since this property isn't needed
anymore and it haven't been released to any stable release.
Marcus Efraimsson 8 lat temu
rodzic
commit
035b724725

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

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

+ 0 - 1
pkg/services/sqlstore/dashboard.go

@@ -270,7 +270,6 @@ func makeQueryResult(query *search.FindPersistedDashboardsQuery, res []Dashboard
 				Title:       item.Title,
 				Title:       item.Title,
 				Uri:         "db/" + item.Slug,
 				Uri:         "db/" + item.Slug,
 				Url:         url,
 				Url:         url,
-				Slug:        item.Slug,
 				Type:        getHitType(item),
 				Type:        getHitType(item),
 				FolderId:    item.FolderId,
 				FolderId:    item.FolderId,
 				FolderTitle: item.FolderTitle,
 				FolderTitle: item.FolderTitle,

+ 0 - 2
public/app/core/services/search_srv.ts

@@ -134,7 +134,6 @@ export class SearchSrv {
           items: [],
           items: [],
           toggle: this.toggleFolder.bind(this),
           toggle: this.toggleFolder.bind(this),
           url: hit.url,
           url: hit.url,
-          slug: hit.slug,
           icon: 'fa fa-folder',
           icon: 'fa fa-folder',
           score: _.keys(sections).length,
           score: _.keys(sections).length,
         };
         };
@@ -154,7 +153,6 @@ export class SearchSrv {
             uid: hit.uid,
             uid: hit.uid,
             title: hit.folderTitle,
             title: hit.folderTitle,
             url: hit.url,
             url: hit.url,
-            slug: hit.slug,
             items: [],
             items: [],
             icon: 'fa fa-folder-open',
             icon: 'fa fa-folder-open',
             toggle: this.toggleFolder.bind(this),
             toggle: this.toggleFolder.bind(this),