From 63a2d5a1f54d077de7d5564e62e4c660bc7b26e1 Mon Sep 17 00:00:00 2001 From: Michael Klein Date: Wed, 26 Oct 2022 11:15:06 +0200 Subject: [PATCH] Prettify peers.index template --- .../app/templates/dc/peers/index.hbs | 386 +++++++++--------- 1 file changed, 191 insertions(+), 195 deletions(-) diff --git a/ui/packages/consul-peerings/app/templates/dc/peers/index.hbs b/ui/packages/consul-peerings/app/templates/dc/peers/index.hbs index 75ee9afa77..aa1bfee1c8 100644 --- a/ui/packages/consul-peerings/app/templates/dc/peers/index.hbs +++ b/ui/packages/consul-peerings/app/templates/dc/peers/index.hbs @@ -1,235 +1,231 @@ - + + ) + }} + as |loader| + > - + -{{#let - - (hash - value=(or sortBy "State:asc") - change=(action (mut sortBy) value="target.selected") - ) - - (hash - state=(hash - value=(if state (split state ',') undefined) - change=(action (mut state) value="target.selectedItems") - ) - searchproperty=(hash - value=(if (not-eq searchproperty undefined) - (split searchproperty ',') - searchProperties - ) - change=(action (mut searchproperty) value="target.selectedItems") - default=searchProperties - ) - ) - - loader.data - -as |sort filters items|}} - - -

- -

-
- - - {{#if (gt items.length 0)}} - - {{/if}} - - - - - - - - {{did-insert (set this 'create' modal)}} -

- Add peer connection -

-
- - - {{#if modal.opened}} - - - {{did-insert (set this 'form' form)}} - - - - {{/if}} - - - - - -
- - Add peer connection - - -
- - - + searchproperty=(hash + value=(if + (not-eq searchproperty undefined) + (split searchproperty ",") + searchProperties + ) + change=(action (mut searchproperty) value="target.selectedItems") + default=searchProperties + ) + ) + loader.data + as |sort filters items| + }} + + +

+ +

+
+ - - - - + {{#if (gt items.length 0)}} + + {{/if}} + + + + @aria={{hash label="Add peer connection"}} + class="peer-create-modal" + as |modal| + > - {{did-insert (set this 'regenerate' modal)}} + {{did-insert (set this "create" modal)}}

- Regenerate token + Add peer connection

- {{#if this.item}} - - {{did-insert (set this 'regenerateForm' form)}} - - + + {{#if modal.opened}} + + + {{did-insert (set this "form" form)}} + + + {{/if}} + - +
+ + Add peer connection + - + + + - + @label="Peer" + as |writer| + > - + + + - - - {{!-- TODO: do we need to check permissions here or will we receive an error automatically? --}} - + {{did-insert (set this "regenerate" modal)}}

- {{t 'routes.dc.peers.index.empty.header' - items=items.length - }} + Regenerate token

-

- {{t 'routes.dc.peers.index.empty.body' - items=items.length - canUsePartitions=(can "use partitions") - canUseACLs=(can "use acls") - htmlSafe=true - }} -

+ {{#if this.item}} + + {{did-insert (set this "regenerateForm" form)}} + + + {{/if}}
- - + -
-
-
-
-
-
-
-{{/let}} + + + + + + + + + + {{! TODO: do we need to check permissions here or will we receive an error automatically? }} + + +

+ {{t + "routes.dc.peers.index.empty.header" + items=items.length + }} +

+
+ +

+ {{t + "routes.dc.peers.index.empty.body" + items=items.length + canUsePartitions=(can "use partitions") + canUseACLs=(can "use acls") + htmlSafe=true + }} +

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