mirror of https://github.com/status-im/consul.git
Add searching ACL's by token
This commit is contained in:
parent
fd696314f1
commit
005fbcd149
|
@ -28,10 +28,14 @@ export default Controller.extend(WithFiltering, {
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
filter: function(item, { s = '', type = '' }) {
|
filter: function(item, { s = '', type = '' }) {
|
||||||
|
const sLower = s.toLowerCase();
|
||||||
return (
|
return (
|
||||||
get(item, 'Name')
|
(get(item, 'Name')
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.indexOf(s.toLowerCase()) !== -1 &&
|
.indexOf(sLower) !== -1 ||
|
||||||
|
get(item, 'ID')
|
||||||
|
.toLowerCase()
|
||||||
|
.indexOf(sLower) !== -1) &&
|
||||||
(type === '' || get(item, 'Type') === type)
|
(type === '' || get(item, 'Type') === type)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{!<form>}}
|
{{!<form>}}
|
||||||
{{freetext-filter onchange=(action onchange) value=search placeholder="Search by name"}}
|
{{freetext-filter onchange=(action onchange) value=search placeholder="Search by name/token"}}
|
||||||
{{radio-group name="type" value=type items=filters onchange=(action onchange)}}
|
{{radio-group name="type" value=type items=filters onchange=(action onchange)}}
|
||||||
{{!</form>}}
|
{{!</form>}}
|
||||||
|
|
Loading…
Reference in New Issue