mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
scopenodes: check if the query exists in the title instead of starts with the query (#100578)
scopenodes: check if the string contains the search param instead of limiting to prefix Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
parent
23a657a72d
commit
9cff383830
@ -104,9 +104,8 @@ func filterAndAppendItem(item scope.ScopeNode, parent string, query string, resu
|
||||
return // Someday this will have an index in raw storage on parentName
|
||||
}
|
||||
|
||||
// skip if query is passed and title doesn't match.
|
||||
// HasPrefix is not the end goal but something that that gets us started.
|
||||
if query != "" && !strings.HasPrefix(item.Spec.Title, query) {
|
||||
// skip if query is passed and title doesn't contain the query.
|
||||
if query != "" && !strings.Contains(item.Spec.Title, query) {
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user