mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
WIP: remove browse mode for dashboard search
Dashboard folders included in all searches. If a dashboard matches a search and has a parent folder then the parent folder is appended to the search result. A hierarchy is then returned in the result with child dashboards under their parent folders.
This commit is contained in:
@@ -45,7 +45,6 @@ func searchHandler(query *Query) error {
|
||||
IsStarred: query.IsStarred,
|
||||
OrgId: query.OrgId,
|
||||
DashboardIds: query.DashboardIds,
|
||||
BrowseMode: query.BrowseMode,
|
||||
}
|
||||
|
||||
if err := bus.Dispatch(&dashQuery); err != nil {
|
||||
|
||||
@@ -68,17 +68,5 @@ func TestSearch(t *testing.T) {
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
Convey("That returns result in browse mode", func() {
|
||||
query.BrowseMode = true
|
||||
err := searchHandler(&query)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
Convey("should return correct results", func() {
|
||||
So(query.Result[0].Title, ShouldEqual, "FOLDER")
|
||||
So(len(query.Result[0].Dashboards), ShouldEqual, 1)
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -47,7 +47,6 @@ type Query struct {
|
||||
Limit int
|
||||
IsStarred bool
|
||||
DashboardIds []int
|
||||
BrowseMode bool
|
||||
|
||||
Result HitList
|
||||
}
|
||||
@@ -58,7 +57,6 @@ type FindPersistedDashboardsQuery struct {
|
||||
UserId int64
|
||||
IsStarred bool
|
||||
DashboardIds []int
|
||||
BrowseMode bool
|
||||
|
||||
Result HitList
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user