Major refactorings around searching, moved to seperate package, trying to move stuff out of models package, extend search support searching different types of entities and different types of dashboards, #960

This commit is contained in:
Torkel Ödegaard
2015-05-13 13:36:13 +02:00
parent c8146e759f
commit 448a8b8d1c
19 changed files with 143 additions and 128 deletions

View File

@@ -126,3 +126,13 @@ type GetDashboardQuery struct {
Result *Dashboard
}
type DashboardTagCloudItem struct {
Term string `json:"term"`
Count int `json:"count"`
}
type GetDashboardTagsQuery struct {
OrgId int64
Result []*DashboardTagCloudItem
}

View File

@@ -1,12 +1,6 @@
package models
type SearchResult struct {
Dashboards []*DashboardSearchHit `json:"dashboards"`
Tags []*DashboardTagCloudItem `json:"tags"`
TagsOnly bool `json:"tagsOnly"`
}
type DashboardSearchHit struct {
type SearchHit struct {
Id int64 `json:"id"`
Title string `json:"title"`
Uri string `json:"uri"`
@@ -14,24 +8,3 @@ type DashboardSearchHit struct {
Tags []string `json:"tags"`
IsStarred bool `json:"isStarred"`
}
type DashboardTagCloudItem struct {
Term string `json:"term"`
Count int `json:"count"`
}
type SearchDashboardsQuery struct {
Title string
Tag string
OrgId int64
UserId int64
Limit int
IsStarred bool
Result []*DashboardSearchHit
}
type GetDashboardTagsQuery struct {
OrgId int64
Result []*DashboardTagCloudItem
}