Developer sidebar: Support search in metadata value and config (#1876)
Improves developer sidebar search to even search within the metadata values and config object. This e.g. allows you to search for all pattern settings in the `stateDescription` metadata. Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>pull/1878/head
parent
fa371993f1
commit
54aa3ab4e8
|
@ -453,10 +453,7 @@ export default {
|
|||
query = query.toLowerCase()
|
||||
if (i.name.toLowerCase().indexOf(query) >= 0) return true
|
||||
if (i.label && i.label.toLowerCase().indexOf(query) >= 0) return true
|
||||
if (i.metadata) {
|
||||
const namespaces = Object.keys(i.metadata).map(n => n.toLowerCase())
|
||||
if (namespaces.includes(query)) return true
|
||||
}
|
||||
if (i.metadata && JSON.stringify(i.metadata).toLowerCase().indexOf(query) >= 0) return true
|
||||
if (i.tags && i.tags.map(t => t.toLowerCase()).includes(query)) return true
|
||||
return false
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue