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

This commit is contained in:
Valeriia Ruban 2023-11-21 20:16:47 -08:00 committed by GitHub
parent 0846916941
commit dae785fe3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -149,7 +149,7 @@
<disclosure.Menu as |panel|>
<panel.Menu as |menu|>
<menu.Separator>
Consul v{{env 'CONSUL_VERSION'}}
Consul v{{this.consulVersion}}
</menu.Separator>
<menu.Item class='docs-link'>
<menu.Action @href={{env 'CONSUL_DOCS_URL'}} @external={{true}}>
@ -199,7 +199,7 @@
<:content-info>
<p>
Consul v{{env 'CONSUL_VERSION'}}
Consul v{{this.consulVersion}}
</p>
{{{concat '<!-- ' (env 'CONSUL_GIT_SHA') '-->'}}}
</:content-info>

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