From 8707b6c3d3e336c53854b7be4c192304ac05134a Mon Sep 17 00:00:00 2001 From: Michael Klein Date: Sun, 9 Oct 2022 13:00:00 +0200 Subject: [PATCH] Always display imported & exported on peer Peers are bi-directional, we need to reflect that --- .../app/components/peerings/provider/index.js | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/ui/packages/consul-ui/app/components/peerings/provider/index.js b/ui/packages/consul-ui/app/components/peerings/provider/index.js index 7b00309d5e..4c67c36a3f 100644 --- a/ui/packages/consul-ui/app/components/peerings/provider/index.js +++ b/ui/packages/consul-ui/app/components/peerings/provider/index.js @@ -17,19 +17,16 @@ export default class PeeringsProvider extends Component { const { router } = this; const owner = getOwner(this); - let tabs; - if (peer.isDialer) { - tabs = [ - { - label: 'Exported Services', - route: 'dc.peers.edit.exported', - }, - ]; - } else { - tabs = [ - { label: 'Imported Services', route: 'dc.peers.edit.imported' }, - { label: 'Addresses', route: 'dc.peers.edit.addresses' }, - ]; + let tabs = [ + { label: 'Imported Services', route: 'dc.peers.edit.imported' }, + { + label: 'Exported Services', + route: 'dc.peers.edit.exported', + }, + ]; + + if (!peer.isReceiver) { + tabs = [...tabs, { label: 'Addresses', route: 'dc.peers.edit.addresses' }]; } return tabs.map((tab) => new Tab({ ...tab, currentRouteName: router.currentRouteName, owner }));