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 41df4d64b0..83b097c39c 100644 --- a/ui/packages/consul-ui/app/components/hashicorp-consul/index.hbs +++ b/ui/packages/consul-ui/app/components/hashicorp-consul/index.hbs @@ -1,274 +1,276 @@ - +{{#let (unique-id) as |guid|}} + - <:home-nav> - - Consul - - - + <:home-nav> + + Consul + + + - <:main-nav> -{{#if @dc}} - + - <:main> - {{yield}} - + <:main> + {{yield}} + - <:content-info> - - © {{env 'CONSUL_COPYRIGHT_YEAR'}} HashiCorp - -

- Consul {{env 'CONSUL_VERSION'}} -

- - Documentation - - {{{concat ''}}} - -
\ No newline at end of file + <:content-info> + + © {{env 'CONSUL_COPYRIGHT_YEAR'}} HashiCorp + +

+ Consul {{env 'CONSUL_VERSION'}} +

+ + Documentation + + {{{concat ''}}} + +
+{{/let}} \ No newline at end of file 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 9865a03ca4..48eface581 100644 --- a/ui/packages/consul-ui/app/components/hashicorp-consul/index.js +++ b/ui/packages/consul-ui/app/components/hashicorp-consul/index.js @@ -1,15 +1,7 @@ import Component from '@glimmer/component'; -import { inject as service } from '@ember/service'; import { action } from '@ember/object'; export default class HashiCorpConsul extends Component { - @service('dom') dom; - - constructor(args, owner) { - super(...arguments); - this.guid = this.dom.guid(this); - } - // TODO: Right now this is the only place where we need permissions // but we are likely to need it elsewhere, so probably need a nice helper get canManageNspaces() { diff --git a/ui/packages/consul-ui/app/helpers/unique-id.js b/ui/packages/consul-ui/app/helpers/unique-id.js new file mode 100644 index 0000000000..93b16b49c5 --- /dev/null +++ b/ui/packages/consul-ui/app/helpers/unique-id.js @@ -0,0 +1,10 @@ +import Helper from '@ember/component/helper'; +import { inject as service } from '@ember/service'; + +export default class UniqueIdHelper extends Helper { + @service('dom') dom; + + compute(params, hash) { + return this.dom.guid({}); + } +}