mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 06:16:08 +00:00
Use some
for the tags search instead of munging and searching
This commit is contained in:
parent
09a885dadd
commit
e7a3235afc
@ -26,10 +26,9 @@ export default Controller.extend(WithFiltering, {
|
|||||||
get(item, 'ID')
|
get(item, 'ID')
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.indexOf(term) !== -1 ||
|
.indexOf(term) !== -1 ||
|
||||||
(get(item, 'Tags') || [])
|
(get(item, 'Tags') || []).some(function(item) {
|
||||||
.join('')
|
return item.toLowerCase().indexOf(term) !== -1;
|
||||||
.toLowerCase()
|
}) ||
|
||||||
.indexOf(term) !== -1 ||
|
|
||||||
get(item, 'Port')
|
get(item, 'Port')
|
||||||
.toString()
|
.toString()
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
|
@ -31,10 +31,9 @@ export default Controller.extend(WithHealthFiltering, {
|
|||||||
(get(item, 'Name')
|
(get(item, 'Name')
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.indexOf(term) !== -1 ||
|
.indexOf(term) !== -1 ||
|
||||||
(get(item, 'Tags') || [])
|
(get(item, 'Tags') || []).some(function(item) {
|
||||||
.join('')
|
return item.toLowerCase().indexOf(term) !== -1;
|
||||||
.toLowerCase()
|
})) &&
|
||||||
.indexOf(term) !== -1) &&
|
|
||||||
item.hasStatus(status)
|
item.hasStatus(status)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user