From 441afa6c5a96e6db2b0af888266cdf65e4ec7502 Mon Sep 17 00:00:00 2001 From: hc-github-team-consul-core Date: Tue, 21 Nov 2023 12:12:11 -0600 Subject: [PATCH] Backport of chore: add suffix to consul version in sidenav into release/1.17.x (#19710) backport of commit c57b97a2eb650dd43bb7a4327f06c06c0dbe702d Co-authored-by: valeriia-ruban --- .../consul-ui/app/components/hashicorp-consul/index.hbs | 2 +- .../consul-ui/app/components/hashicorp-consul/index.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/packages/consul-ui/app/components/hashicorp-consul/index.hbs b/ui/packages/consul-ui/app/components/hashicorp-consul/index.hbs index 10de36f0f3..ba2ed4ca87 100644 --- a/ui/packages/consul-ui/app/components/hashicorp-consul/index.hbs +++ b/ui/packages/consul-ui/app/components/hashicorp-consul/index.hbs @@ -217,7 +217,7 @@ @size='100' @color='disabled' > - {{t "components.hashicorp-consul.side-nav.footer" version=(env 'CONSUL_VERSION')}} + {{t "components.hashicorp-consul.side-nav.footer" version=this.consulVersion}} {{{concat ''}}} diff --git a/ui/packages/consul-ui/app/components/hashicorp-consul/index.js b/ui/packages/consul-ui/app/components/hashicorp-consul/index.js index 6b5135a1be..e47ca22c62 100644 --- a/ui/packages/consul-ui/app/components/hashicorp-consul/index.js +++ b/ui/packages/consul-ui/app/components/hashicorp-consul/index.js @@ -8,4 +8,10 @@ import { inject as service } from '@ember/service'; export default class HashiCorpConsul extends Component { @service('flashMessages') flashMessages; + @service('env') env; + + get consulVersion() { + const suffix = !['', 'oss'].includes(this.env.var('CONSUL_BINARY_TYPE')) ? '+ent' : ''; + return `${this.env.var('CONSUL_VERSION')}${suffix}`; + } }