From 128de18ac1e761f9cba45b184a197dba67c5c71d Mon Sep 17 00:00:00 2001 From: Michael Klein Date: Mon, 10 Oct 2022 11:06:48 +0200 Subject: [PATCH] Add tooltips exported/imported tabs --- .../app/components/peerings/provider/index.js | 11 +++++++++-- ui/packages/consul-ui/translations/routes/en-us.yaml | 8 ++++++-- 2 files changed, 15 insertions(+), 4 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 44a76603a8..aed351336d 100644 --- a/ui/packages/consul-ui/app/components/peerings/provider/index.js +++ b/ui/packages/consul-ui/app/components/peerings/provider/index.js @@ -5,6 +5,7 @@ import { Tab } from 'consul-ui/components/tab-nav'; export default class PeeringsProvider extends Component { @service router; + @service intl; get data() { return { @@ -17,15 +18,21 @@ export default class PeeringsProvider extends Component { const { router } = this; const owner = getOwner(this); + const { isReceiver, Name: name } = peer; let tabs = [ - { label: 'Imported Services', route: 'dc.peers.edit.imported' }, + { + label: 'Imported Services', + route: 'dc.peers.edit.imported', + tooltip: this.intl.t('routes.dc.peers.index.detail.imported.tab-tooltip', { name }), + }, { label: 'Exported Services', route: 'dc.peers.edit.exported', + tooltip: this.intl.t('routes.dc.peers.index.detail.exported.tab-tooltip', { name }), }, ]; - if (peer.isReceiver) { + if (isReceiver) { tabs = [...tabs, { label: 'Addresses', route: 'dc.peers.edit.addresses' }]; } diff --git a/ui/packages/consul-ui/translations/routes/en-us.yaml b/ui/packages/consul-ui/translations/routes/en-us.yaml index e6ed415227..f8f14fedf0 100644 --- a/ui/packages/consul-ui/translations/routes/en-us.yaml +++ b/ui/packages/consul-ui/translations/routes/en-us.yaml @@ -135,11 +135,15 @@ dc: detail: imported: count: | - {count} imported services + {count} imported services tooltip: The number of services imported from {name} + tab-tooltip: Services imported from {name} exported: count: | - {count} exported services + {count} exported services + tooltip: The number of services exported from {name} + tab-tooltip: Services exported from {name} + addresses: tooltip: The number of services exported from {name} partitions: index: