From e2908679c66b60b795400551118f74e5bebdb5fb Mon Sep 17 00:00:00 2001 From: John Cowen Date: Thu, 21 Jul 2022 17:38:57 +0100 Subject: [PATCH] ui: Allow searching for peerings by ID (#13837) --- ui/packages/consul-peerings/vendor/consul-peerings/routes.js | 2 +- ui/packages/consul-ui/app/models/peer.js | 1 + ui/packages/consul-ui/app/search/predicates/peer.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/packages/consul-peerings/vendor/consul-peerings/routes.js b/ui/packages/consul-peerings/vendor/consul-peerings/routes.js index 89709bb4b5..fd2a92aca0 100644 --- a/ui/packages/consul-peerings/vendor/consul-peerings/routes.js +++ b/ui/packages/consul-peerings/vendor/consul-peerings/routes.js @@ -12,7 +12,7 @@ state: 'state', searchproperty: { as: 'searchproperty', - empty: [['Name']], + empty: [['Name', 'ID']], }, search: { as: 'filter', diff --git a/ui/packages/consul-ui/app/models/peer.js b/ui/packages/consul-ui/app/models/peer.js index 5b2c6a01ad..cd050524bc 100644 --- a/ui/packages/consul-ui/app/models/peer.js +++ b/ui/packages/consul-ui/app/models/peer.js @@ -22,6 +22,7 @@ export default class Peer extends Model { @attr('string') Name; @attr('string') State; + @attr('string') ID; @attr('number') ImportedServiceCount; @attr('number') ExportedServiceCount; @attr() PeerServerAddresses; diff --git a/ui/packages/consul-ui/app/search/predicates/peer.js b/ui/packages/consul-ui/app/search/predicates/peer.js index e97c2d2d15..5f1606a8ed 100644 --- a/ui/packages/consul-ui/app/search/predicates/peer.js +++ b/ui/packages/consul-ui/app/search/predicates/peer.js @@ -1,3 +1,4 @@ export default { Name: item => item.Name, + ID: item => item.ID, };