From 25961355c1492780727a7f45bb41580a6e37ae2a Mon Sep 17 00:00:00 2001 From: John Cowen Date: Thu, 4 Nov 2021 12:14:43 +0000 Subject: [PATCH] ui: Only show partition / partition selector if enabled (#11484) I missed that partitions should never display if you can't use them, not just if you can't choose them. --- .../consul/partition/selector/index.hbs | 114 +++++++++--------- 1 file changed, 58 insertions(+), 56 deletions(-) diff --git a/ui/packages/consul-partitions/app/components/consul/partition/selector/index.hbs b/ui/packages/consul-partitions/app/components/consul/partition/selector/index.hbs index 288e7af91e..ec2449e731 100644 --- a/ui/packages/consul-partitions/app/components/consul/partition/selector/index.hbs +++ b/ui/packages/consul-partitions/app/components/consul/partition/selector/index.hbs @@ -1,60 +1,62 @@ -{{#if (can "choose partitions" dc=@dc)}} -
  • + + + {{@partition}} + + + {{#let components.MenuItem components.MenuSeparator as |MenuItem MenuSeparator|}} + + {{#each (reject-by 'DeletedAt' @partitions) as |item|}} + + + {{item.Name}} + + + {{/each}} + {{#if (can 'manage partitions')}} + + + + Manage Admin Partitions + + + {{/if}} + {{/let}} + + +
  • + {{else}} +
  • - - - {{@partition}} - - - {{#let components.MenuItem components.MenuSeparator as |MenuItem MenuSeparator|}} - - {{#each (reject-by 'DeletedAt' @partitions) as |item|}} - - - {{item.Name}} - - - {{/each}} - {{#if (can 'manage partitions')}} - - - - Manage Admin Partitions - - - {{/if}} - {{/let}} - - + {{@partition}}
  • -{{else}} -
  • - {{@partition}} -
  • + {{/if}} {{/if}}