From 2fb8530045b89d96457dea50309cbc9c17ae22dc Mon Sep 17 00:00:00 2001 From: John Cowen Date: Thu, 24 May 2018 12:47:48 +0100 Subject: [PATCH] Enable searching by port in the Node > [Service] listing --- ui-v2/app/controllers/dc/nodes/show.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui-v2/app/controllers/dc/nodes/show.js b/ui-v2/app/controllers/dc/nodes/show.js index 0f48b55155..06c5c4004d 100644 --- a/ui-v2/app/controllers/dc/nodes/show.js +++ b/ui-v2/app/controllers/dc/nodes/show.js @@ -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: {