Enable searching by port in the Node > [Service] listing

This commit is contained in:
John Cowen 2018-05-24 12:47:48 +01:00
parent 6e9cbeecd0
commit 2fb8530045
1 changed files with 6 additions and 1 deletions

View File

@ -14,10 +14,15 @@ export default Controller.extend(WithFiltering, {
set(this, 'selectedTab', 'health-checks');
},
filter: function(item, { s = '' }) {
const term = s.toLowerCase();
return (
get(item, 'Service')
.toLowerCase()
.indexOf(s.toLowerCase()) !== -1
.indexOf(term) !== -1 ||
get(item, 'Port')
.toString()
.toLowerCase()
.indexOf(term) !== -1
);
},
actions: {