mirror of
https://github.com/grafana/grafana.git
synced 2025-02-09 23:16:16 -06:00
Fixed case insensitive search for file based dashboards, Fixes #2258
This commit is contained in:
parent
647e43dcbd
commit
d0e7d53c69
@ -51,13 +51,15 @@ func (index *JsonDashIndex) Search(query *Query) ([]*Hit, error) {
|
||||
return results, nil
|
||||
}
|
||||
|
||||
queryStr := strings.ToLower(query.Title)
|
||||
|
||||
for _, item := range index.items {
|
||||
if len(results) > query.Limit {
|
||||
break
|
||||
}
|
||||
|
||||
// add results with matchig title filter
|
||||
if strings.Contains(item.TitleLower, query.Title) {
|
||||
if strings.Contains(item.TitleLower, queryStr) {
|
||||
results = append(results, &Hit{
|
||||
Type: DashHitJson,
|
||||
Title: item.Dashboard.Title,
|
||||
|
Loading…
Reference in New Issue
Block a user