Backport of chore: add suffix to consul version in sidenav into release/1.17.x (#19710)

backport of commit c57b97a2eb

Co-authored-by: valeriia-ruban <valeriia.ruban@hashicorp.com>
pull/19723/head
hc-github-team-consul-core 2023-11-21 12:12:11 -06:00 committed by GitHub
parent f31b21d8ea
commit 441afa6c5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -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}}
</Hds::Text::Display>
{{{concat '<!-- ' (env 'CONSUL_GIT_SHA') '-->'}}}
</footer>

View File

@ -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}`;
}
}