From b9c23dee6909c68c40c20c10e20ffa4519cb614b 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 0f48b5515..06c5c4004 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: {