From ef83c0799f3d482c907095390cfd1a62e26d08af Mon Sep 17 00:00:00 2001 From: Michael Klein Date: Wed, 5 Oct 2022 12:08:32 +0200 Subject: [PATCH] Add link to peers.edit to peerings list --- .../app/components/consul/peer/list/index.hbs | 107 ++++++++++-------- 1 file changed, 60 insertions(+), 47 deletions(-) diff --git a/ui/packages/consul-peerings/app/components/consul/peer/list/index.hbs b/ui/packages/consul-peerings/app/components/consul/peer/list/index.hbs index dd7b5d645a..a762c24c65 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/list/index.hbs +++ b/ui/packages/consul-peerings/app/components/consul/peer/list/index.hbs @@ -2,13 +2,21 @@ class="consul-peer-list" ...attributes @items={{@items}} -as |item index|> + as |item index| +> -

- {{item.Name}} -

+ {{#if (can "delete peer" item=item)}} + + {{item.Name}} + + {{else}} +

+ {{item.Name}} +

+ {{/if}}
@@ -16,24 +24,22 @@ as |item index|>
- {{t 'routes.dc.peers.index.detail.imported.count' + {{t + "routes.dc.peers.index.detail.imported.count" count=(format-number item.ImportedServiceCount) }}
- {{t 'routes.dc.peers.index.detail.exported.count' + {{t + "routes.dc.peers.index.detail.exported.count" count=(format-number item.ExportedServiceCount) }}
@@ -43,42 +49,49 @@ as |item index|> {{#if (can "delete peer" item=item)}} - + {{#if (and (can "write peer" item=item) item.isDialer)}} + + Regenerate token + + + {{/if}} + - Regenerate token + View -{{/if}} - - - Delete - - - - - Confirm delete - - -

- Are you sure you want to delete this peer? -

-
- - - Delete - - -
-
-
-
-{{/if}} + + + Delete + + + + + Confirm delete + + +

+ Are you sure you want to delete this peer? +

+
+ + + Delete + + +
+
+
+
+ {{/if}}
- - + \ No newline at end of file