mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Added limit to dashboard list panel and search
This commit is contained in:
@@ -33,6 +33,11 @@ func setIsStarredFlagOnSearchResults(c *middleware.Context, hits []*m.DashboardS
|
||||
func Search(c *middleware.Context) {
|
||||
queryText := c.Query("q")
|
||||
starred := c.Query("starred")
|
||||
limit := c.QueryInt("limit")
|
||||
|
||||
if limit == 0 {
|
||||
limit = 200
|
||||
}
|
||||
|
||||
result := m.SearchResult{
|
||||
Dashboards: []*m.DashboardSearchHit{},
|
||||
@@ -58,6 +63,7 @@ func Search(c *middleware.Context) {
|
||||
Title: matches[3],
|
||||
Tag: matches[2],
|
||||
UserId: c.UserId,
|
||||
Limit: limit,
|
||||
IsStarred: starred == "1",
|
||||
AccountId: c.AccountId,
|
||||
}
|
||||
|
Reference in New Issue
Block a user