diff --git a/ui-v2/app/search/filters/service/node.js b/ui-v2/app/search/filters/service/node.js index 5f1272421..b15625465 100644 --- a/ui-v2/app/search/filters/service/node.js +++ b/ui-v2/app/search/filters/service/node.js @@ -8,7 +8,8 @@ export default function(filterable) { .indexOf(term) !== -1 || get(item, 'Service.ID') .toLowerCase() - .indexOf(term) !== -1 + .indexOf(term) !== -1 || + `${get(item, 'Service.Address')}:${get(item, 'Service.Port')}`.indexOf(term) !== -1 ); }); } diff --git a/ui-v2/tests/unit/search/filters/service/node-test.js b/ui-v2/tests/unit/search/filters/service/node-test.js index ca6f6ae32..d0c1b1827 100644 --- a/ui-v2/tests/unit/search/filters/service/node-test.js +++ b/ui-v2/tests/unit/search/filters/service/node-test.js @@ -29,6 +29,24 @@ test('items are found by properties', function(assert) { assert.ok(actual); }); }); +test('items are found by address:port', function(assert) { + const instance = { + Service: { + ID: 'id', + Address: '0.0.0.0', + Port: 8000, + }, + Node: { + Node: 'node-0', + }, + }; + ['0.0.0.0', '8000', '0:8000', '0.0.0.0:8000'].forEach(function(item) { + let actual = filter(instance, { + s: item, + }); + assert.ok(actual); + }); +}); test('items are not found', function(assert) { [ {