From 6fbe799178157973d5d8e37250010ac67807cc09 Mon Sep 17 00:00:00 2001 From: Michael Klein Date: Wed, 5 Oct 2022 11:48:03 +0200 Subject: [PATCH] Allow managed-runtime badge to be dynamic (#14853) --- .../consul/datacenter/selector/index.hbs | 81 +++++++++---------- 1 file changed, 39 insertions(+), 42 deletions(-) diff --git a/ui/packages/consul-ui/app/components/consul/datacenter/selector/index.hbs b/ui/packages/consul-ui/app/components/consul/datacenter/selector/index.hbs index 72b44e3a9b..16bc038f65 100644 --- a/ui/packages/consul-ui/app/components/consul/datacenter/selector/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/datacenter/selector/index.hbs @@ -1,67 +1,64 @@ -
  • +
  • {{#if (gt @dcs.length 1)}} - + as |disclosure| + > + {{@dc.Name}} -

    - Datacenters shown in this dropdown are available through WAN Federation. -

    - - - DATACENTERS - - {{#each menu.items as |item|}} - - + Datacenters shown in this dropdown are available through WAN Federation. +

    + + + DATACENTERS + + {{#each menu.items as |item|}} + + - {{item.Name}} + ) + }} + > + {{item.Name}} {{#if item.Primary}} Primary {{/if}} {{#if item.Local}} Local {{/if}} - - - {{/each}} - +
    +
    + {{/each}} +
    {{else}} -
    +
    {{@dcs.firstObject.Name}} - {{#if (env 'CONSUL_HCP_MANAGED_RUNTIME')}} - Self-managed - {{/if}} + {{#let (env 'CONSUL_HCP_MANAGED_RUNTIME') as |managedRuntime|}} + {{#if managedRuntime}} + {{capitalize managedRuntime}} + {{/if}} + {{/let}}
    {{/if}} -
  • - + \ No newline at end of file