WIP: dashboard search by folder + toggle for list or tree mode

This commit is contained in:
Daniel Lee
2017-06-12 15:49:09 +02:00
parent 7381d2565d
commit c602afb9c6
5 changed files with 71 additions and 27 deletions
+8
View File
@@ -15,11 +15,17 @@ func Search(c *middleware.Context) {
starred := c.Query("starred")
limit := c.QueryInt("limit")
dashboardType := c.Query("type")
folderId := c.QueryInt64("folderId")
mode := c.Query("mode")
if limit == 0 {
limit = 1000
}
if mode == "" {
mode = "list"
}
dbids := make([]int, 0)
for _, id := range c.QueryStrings("dashboardIds") {
dashboardId, err := strconv.Atoi(id)
@@ -37,6 +43,8 @@ func Search(c *middleware.Context) {
OrgId: c.OrgId,
DashboardIds: dbids,
Type: dashboardType,
FolderId: folderId,
Mode: mode,
}
err := bus.Dispatch(&searchQuery)