chore: add suffix to consul version in sidenav (#19660)

pull/19713/head
Valeriia Ruban 2023-11-21 09:47:16 -08:00 committed by GitHub
parent d3bf47fe08
commit f69c68e777
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}`;
}
}