From 083eaa801a69fd4e1b81564a49b96257e17fbb86 Mon Sep 17 00:00:00 2001 From: Suresh Dunga Date: Mon, 6 Apr 2026 12:08:02 +0530 Subject: [PATCH 01/34] replace slotted addon for app-view components --- .../app/components/app-error/index.hbs | 8 +- .../app/components/app-view/index.hbs | 38 +++--- .../components/consul/acl/disabled/index.hbs | 8 +- .../templates/dc/acls/auth-methods/index.hbs | 12 +- .../templates/dc/acls/auth-methods/show.hbs | 113 ++++++++++-------- .../app/templates/dc/acls/policies/edit.hbs | 12 +- .../app/templates/dc/acls/policies/index.hbs | 16 +-- .../app/templates/dc/acls/roles/edit.hbs | 12 +- .../app/templates/dc/acls/roles/index.hbs | 16 +-- .../app/templates/dc/acls/tokens/edit.hbs | 16 +-- .../app/templates/dc/acls/tokens/index.hbs | 16 +-- .../app/templates/dc/intentions/edit.hbs | 12 +- .../app/templates/dc/intentions/index.hbs | 16 +-- .../consul-ui/app/templates/dc/kv/edit.hbs | 12 +- .../consul-ui/app/templates/dc/kv/index.hbs | 20 ++-- .../app/templates/dc/nodes/index.hbs | 12 +- .../consul-ui/app/templates/dc/nodes/show.hbs | 26 ++-- .../app/templates/dc/nspaces/edit.hbs | 16 +-- .../app/templates/dc/nspaces/index.hbs | 16 +-- .../app/templates/dc/partitions/edit.hbs | 14 +-- .../app/templates/dc/partitions/index.hbs | 16 +-- .../app/templates/dc/peers/index.hbs | 16 +-- .../consul-ui/app/templates/dc/peers/show.hbs | 12 +- .../app/templates/dc/routing-config.hbs | 12 +- .../app/templates/dc/services/index.hbs | 12 +- .../app/templates/dc/services/instance.hbs | 20 ++-- .../app/templates/dc/services/show.hbs | 24 ++-- .../consul-ui/app/templates/dc/show.hbs | 16 +-- .../consul-ui/app/templates/settings.hbs | 8 +- 29 files changed, 277 insertions(+), 270 deletions(-) diff --git a/ui/packages/consul-ui/app/components/app-error/index.hbs b/ui/packages/consul-ui/app/components/app-error/index.hbs index ca65502f593..6d5a67e0f97 100644 --- a/ui/packages/consul-ui/app/components/app-error/index.hbs +++ b/ui/packages/consul-ui/app/components/app-error/index.hbs @@ -4,15 +4,15 @@ }} - + <:header>

Error {{@error.status}}

-
- + + <:content> - +
diff --git a/ui/packages/consul-ui/app/components/app-view/index.hbs b/ui/packages/consul-ui/app/components/app-view/index.hbs index 6cb7e313ee8..a70f6cfee53 100644 --- a/ui/packages/consul-ui/app/components/app-view/index.hbs +++ b/ui/packages/consul-ui/app/components/app-view/index.hbs @@ -11,36 +11,34 @@
-
- - {{document-attrs class="with-breadcrumbs"}} - {{yield}} - -
+
- - {{yield}} - + {{yield to='header'}}
- - - {{yield}} - + + {{#if (has-block 'actions')}} + {{yield to='actions'}} + {{/if}}
- - {{yield}} - + {{#if (has-block 'nav')}} + {{yield to='nav'}} + {{/if}}
- + {{#if (has-block 'toolbar')}} - {{yield}} - + {{yield to='toolbar'}} + {{/if}}
- {{yield}} + {{yield to='content'}}
diff --git a/ui/packages/consul-ui/app/components/consul/acl/disabled/index.hbs b/ui/packages/consul-ui/app/components/consul/acl/disabled/index.hbs index 68aef3859e9..75fc246d402 100644 --- a/ui/packages/consul-ui/app/components/consul/acl/disabled/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/acl/disabled/index.hbs @@ -4,12 +4,12 @@ }} - + <:header>

Tokens

-
- + + <:content>

Welcome to ACLs

@@ -40,6 +40,6 @@
-
+
diff --git a/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/index.hbs b/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/index.hbs index a372e499960..711555c84fe 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/index.hbs @@ -63,12 +63,12 @@ as |route|> - + <:header>

-
- + + <:toolbar> {{#if (gt items.length 0)}} @filter={{filters}} /> {{/if}} - - + + <:content> - +
{{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show.hbs b/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show.hbs index b14c3230571..5606f369d1e 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show.hbs @@ -3,11 +3,10 @@ SPDX-License-Identifier: BUSL-1.1 }} - - + name=route.params.id ) }} - as |loader|> + as |loader| + > - + {{#if (eq loader.error.status '401')}} {{else}} - + {{/if}} - -{{#let - loader.data -as |item|}} - - - - - - - -

- -

- -
- - - - - - {{outlet}} - - -
-{{/let}} + + {{#let loader.data as |item|}} + + <:breadcrumbs> + + + + + <:header> +

+ +

+ + + <:nav> + + + <:content> + + {{outlet}} + + +
+ {{/let}}
\ No newline at end of file diff --git a/ui/packages/consul-ui/app/templates/dc/acls/policies/edit.hbs b/ui/packages/consul-ui/app/templates/dc/acls/policies/edit.hbs index 27637c78f27..cd46aedfc7e 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/policies/edit.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/policies/edit.hbs @@ -43,12 +43,12 @@ as |dc partition nspace id item create|}} - + <:breadcrumbs> - - + + <:header>

{{#if create }} @@ -60,8 +60,8 @@ as |dc partition nspace id item create|}} {{/if}} {{/if}}

-
- + + <:content> {{#if (not create) }}
@@ -126,7 +126,7 @@ as |dc partition nspace id item create|}} @onItemsChange={{action (mut this.items) value="data"}} /> {{/if}} - + {{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/acls/policies/index.hbs b/ui/packages/consul-ui/app/templates/dc/acls/policies/index.hbs index 3783e9c859c..8cc8a7cca38 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/policies/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/policies/index.hbs @@ -60,12 +60,12 @@ as |route|> - + <:header>

-
- + + <:actions> {{#if (can "create policies")}} data-test-create /> {{/if}} - - + + <:toolbar> {{#if (gt items.length 0) }} @filter={{filters}} /> {{/if}} - - + + <:content> - +
{{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/acls/roles/edit.hbs b/ui/packages/consul-ui/app/templates/dc/acls/roles/edit.hbs index ce21b75b5ed..9cede5a18e0 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/roles/edit.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/roles/edit.hbs @@ -41,12 +41,12 @@ as |dc partition nspace item create|}} - + <:breadcrumbs> - - + + <:header>

{{#if create }} @@ -54,8 +54,8 @@ as |dc partition nspace item create|}} {{/if}}

-
- + + <:content> {{#if (not create) }}
@@ -84,7 +84,7 @@ as |dc partition nspace item create|}} @onDelete={{fn this.onDelete item}} @onItemsChange={{action (mut this.items) value="data"}} /> - + {{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/acls/roles/index.hbs b/ui/packages/consul-ui/app/templates/dc/acls/roles/index.hbs index ba6ecb528bc..fbd97f0da40 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/roles/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/roles/index.hbs @@ -54,12 +54,12 @@ as |route|> - + <:header>

-
- + + <:actions> {{#if (can "create roles")}} data-test-create /> {{/if}} - - + + <:toolbar> {{#if (gt items.length 0) }} @filter={{filters}} /> {{/if}} - - + + <:content> - +
{{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/acls/tokens/edit.hbs b/ui/packages/consul-ui/app/templates/dc/acls/tokens/edit.hbs index c03c290ee9f..50717e8283f 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/tokens/edit.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/tokens/edit.hbs @@ -41,12 +41,12 @@ as |dc partition nspace item create|}} - + <:breadcrumbs> - - + + <:header>

{{#if create}} @@ -54,8 +54,8 @@ as |dc partition nspace item create|}} {{/if}}

-
- + + <:actions> {{#if (not create)}} {{#if (not-eq item.AccessorID this.token.AccessorID)}} @@ -98,8 +98,8 @@ as |dc partition nspace item create|}} {{/if}} {{/if}} - - + + <:content> {{#if (token/is-legacy item)}} Update @@ -154,7 +154,7 @@ as |dc partition nspace item create|}} @onDelete={{fn this.onDelete item}} @onChange={{action 'change'}} /> - +
{{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/acls/tokens/index.hbs b/ui/packages/consul-ui/app/templates/dc/acls/tokens/index.hbs index b87d82cbe07..14eb25904bb 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/tokens/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/tokens/index.hbs @@ -57,12 +57,12 @@ as |route|> - + <:header>

-
- + + <:actions> {{#if (can "create tokens")}} data-test-create /> {{/if}} - - + + <:toolbar> {{#if (gt items.length 0)}} @filter={{filters}} /> {{/if}} - - + + <:content> {{#if (token/is-legacy items)}} Update @@ -131,7 +131,7 @@ as |route|> - +
{{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/intentions/edit.hbs b/ui/packages/consul-ui/app/templates/dc/intentions/edit.hbs index 049dd7917b5..39f073b24d2 100644 --- a/ui/packages/consul-ui/app/templates/dc/intentions/edit.hbs +++ b/ui/packages/consul-ui/app/templates/dc/intentions/edit.hbs @@ -30,12 +30,12 @@ as |route|> (not (can "write intention" item=loader.data)) as |item readOnly|}} - + <:breadcrumbs> - - + + <:header>

{{#if (not readOnly)}} {{#if item.ID}} @@ -47,8 +47,8 @@ as |item readOnly|}} {{/if}}

-
- + + <:content> - +
{{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/intentions/index.hbs b/ui/packages/consul-ui/app/templates/dc/intentions/index.hbs index 2cb37cc4aea..73b37cac4ca 100644 --- a/ui/packages/consul-ui/app/templates/dc/intentions/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/intentions/index.hbs @@ -51,13 +51,13 @@ as |route|> as |sort filters items|}} - + <:header>

{{format-number items.length}} total

-
- + + <:actions> {{#if (can 'create intentions')}} data-test-create /> {{/if}} - - + + <:toolbar> {{#if (gt items.length 0) }} /> {{/if}} - - + + <:content> {{#let (refresh-route) as |refreshRoute|}} {{/let}} - +
{{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/kv/edit.hbs b/ui/packages/consul-ui/app/templates/dc/kv/edit.hbs index 52caf4506df..42d789dfd5b 100644 --- a/ui/packages/consul-ui/app/templates/dc/kv/edit.hbs +++ b/ui/packages/consul-ui/app/templates/dc/kv/edit.hbs @@ -45,7 +45,7 @@ as |dc partition nspace item|}} - + <:breadcrumbs> {{#if (not-eq parentKey separator)}} @@ -74,9 +74,9 @@ as |parts|}} {{/if}} - + - + <:header>

{{#if (and item.Key (not-eq item.Key parentKey))}} @@ -85,9 +85,9 @@ as |parts|}} {{/if}}

-
+ - + <:content> {{! if a KV has a session `Session` will always be populated despite any specific session permissions }} {{#if item.Session}} @@ -136,7 +136,7 @@ as |parts|}} {{/if}} {{/if}} - +
{{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/kv/index.hbs b/ui/packages/consul-ui/app/templates/dc/kv/index.hbs index 7042b62f1c0..4dce98aa737 100644 --- a/ui/packages/consul-ui/app/templates/dc/kv/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/kv/index.hbs @@ -88,16 +88,16 @@ as |route|> as |sort filters parent items|}} {{#if (not-eq parent.Key '/') }} - + <:breadcrumbs> {{#each (slice 0 -2 (split parent.Key '/')) as |breadcrumb index|}} {{/each}} - + {{/if}} - + <:header>

{{#if (eq parent.Key '/')}} @@ -106,8 +106,8 @@ as |sort filters parent items|}} {{/if}}

-
- + + <:toolbar> {{#if (gt items.length 0) }} {{/if}} - - + + <:actions> {{#if (can 'create kvs')}} {{#if (and parent.Key (not-eq parent.Key '/')) }} {{/if}} {{/if}} - - + + <:content> {{#let (refresh-route) as |refreshRoute|}} {{/let}} - +
{{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/nodes/index.hbs b/ui/packages/consul-ui/app/templates/dc/nodes/index.hbs index 39e2ddb2755..16d05245d1c 100644 --- a/ui/packages/consul-ui/app/templates/dc/nodes/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/nodes/index.hbs @@ -52,14 +52,14 @@ }} {{#let (reject-by 'Meta.synthetic-node' items) as |filtered|}} - + <:header>

{{format-number items.length}} total

-
- + + <:toolbar> {{#if (gt filtered.length 0)}} {{/if}} - - + + <:content> - +
{{/let}} {{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/nodes/show.hbs b/ui/packages/consul-ui/app/templates/dc/nodes/show.hbs index 1221750d4a9..791dc0a8a87 100644 --- a/ui/packages/consul-ui/app/templates/dc/nodes/show.hbs +++ b/ui/packages/consul-ui/app/templates/dc/nodes/show.hbs @@ -68,14 +68,14 @@ as |route|> tomography.data as |item tomography|}} - + <:notification as |status type|> - - - + + <:breadcrumbs> + - - + + <:header>

-
- + + <:nav> - - + + <:actions> {{format-ipaddr item.Address}} - - + + <:content> {{outlet}} - +
{{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/nspaces/edit.hbs b/ui/packages/consul-ui/app/templates/dc/nspaces/edit.hbs index 138554645f2..04af831886c 100644 --- a/ui/packages/consul-ui/app/templates/dc/nspaces/edit.hbs +++ b/ui/packages/consul-ui/app/templates/dc/nspaces/edit.hbs @@ -35,19 +35,19 @@ as |route|> loader.data.isNew as |dc partition nspace item create|}} - + <:breadcrumbs> - - + + <:header>

-
- - - + + <:actions> + + <:content> - +
{{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/nspaces/index.hbs b/ui/packages/consul-ui/app/templates/dc/nspaces/index.hbs index 6916079afb5..4690ee7d107 100644 --- a/ui/packages/consul-ui/app/templates/dc/nspaces/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/nspaces/index.hbs @@ -47,12 +47,12 @@ as |route|> as |sort filters items|}} - + <:header>

-
- + + <:actions> {{#if (can "create nspaces")}} data-test-create /> {{/if}} - - + + <:toolbar> {{#if (gt items.length 0)}} @filter={{filters}} /> {{/if}} - - + + <:content> {{#let (refresh-route) as |refreshRoute|}} {{/let}} - +
{{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/partitions/edit.hbs b/ui/packages/consul-ui/app/templates/dc/partitions/edit.hbs index d416450e7f4..55090cc7c84 100644 --- a/ui/packages/consul-ui/app/templates/dc/partitions/edit.hbs +++ b/ui/packages/consul-ui/app/templates/dc/partitions/edit.hbs @@ -34,23 +34,23 @@ as |route|> loader.data as |dc partition nspace item|}} - + <:breadcrumbs> - - + + <:header>

-
- + + <:content> - +
{{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/partitions/index.hbs b/ui/packages/consul-ui/app/templates/dc/partitions/index.hbs index 2bb8ebc5a37..f35728b36b6 100644 --- a/ui/packages/consul-ui/app/templates/dc/partitions/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/partitions/index.hbs @@ -47,12 +47,12 @@ as |route|> as |sort filters items|}} - + <:header>

-
- + + <:actions> {{#if (can 'create partitions')}} data-test-create /> {{/if}} - - + + <:toolbar> {{#if (gt items.length 0)}} @filter={{filters}} /> {{/if}} - - + + <:content> {{#let (refresh-route) as |refreshRoute|}} {{/let}} - +
{{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/peers/index.hbs b/ui/packages/consul-ui/app/templates/dc/peers/index.hbs index b4f4d7724d8..7de7d8b9920 100644 --- a/ui/packages/consul-ui/app/templates/dc/peers/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/peers/index.hbs @@ -45,12 +45,12 @@ as |sort filters items| }} - + <:header>

-
- + + <:toolbar> {{#if (gt items.length 0)}} {{/if}} - - + + <:actions> - - + + <:content> - +
{{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/peers/show.hbs b/ui/packages/consul-ui/app/templates/dc/peers/show.hbs index 5ad3f5fea97..b728558db87 100644 --- a/ui/packages/consul-ui/app/templates/dc/peers/show.hbs +++ b/ui/packages/consul-ui/app/templates/dc/peers/show.hbs @@ -30,17 +30,17 @@ as |dc partition nspace item| }} - + <:breadcrumbs> - - + + <:header>

-
- + + <:content> @@ -56,7 +56,7 @@ > {{outlet}} - +
{{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/routing-config.hbs b/ui/packages/consul-ui/app/templates/dc/routing-config.hbs index 4e955bba6b0..9cbebbee811 100644 --- a/ui/packages/consul-ui/app/templates/dc/routing-config.hbs +++ b/ui/packages/consul-ui/app/templates/dc/routing-config.hbs @@ -30,24 +30,24 @@ as |route|> loader.data as |item|}} - + <:breadcrumbs> - - + + <:header>

-
- + + <:content>
-
+
{{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/services/index.hbs b/ui/packages/consul-ui/app/templates/dc/services/index.hbs index c6101f48194..4144eb4b0c3 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/index.hbs @@ -64,13 +64,13 @@ as |route|> as |sort filters items partition nspace|}} - + <:header>

{{format-number items.length}} total

-
- + + <:toolbar> {{#if (gt items.length 0) }} {{#let (collection items) as |items|}} {{/let}} {{/if}} - - + + <:content> - +
diff --git a/ui/packages/consul-ui/app/templates/dc/services/instance.hbs b/ui/packages/consul-ui/app/templates/dc/services/instance.hbs index eb46bd4834f..a2498992a99 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/instance.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/instance.hbs @@ -106,13 +106,13 @@ {{/if}} - + <:breadcrumbs> - - + + <:header>

@@ -123,8 +123,8 @@ {{#if (eq this.meta.ServiceProxy.Mode 'transparent')}} {{/if}} -
- + + <:nav>
Service Name
{{item.Service.PeerName}}
{{/if}} -
- + + <:actions> {{#let (or item.Service.Address item.Node.Address) as |address|}} {{format-ipaddr address}} {{/let}} - - + + <:content> {{outlet}} - +
{{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/services/show.hbs b/ui/packages/consul-ui/app/templates/dc/services/show.hbs index c49ca31d19a..f48c9b4dce7 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show.hbs @@ -107,14 +107,14 @@ as |items item dc|}} ) as |tabs|}} - + <:notification as |status type item error|> - - + + <:breadcrumbs> - - + + <:header>

-
- + + <:nav> {{#if (not-eq item.Service.Kind 'mesh-gateway')}} {{/if}} - - + + <:actions> {{/if}} - - + + <:content> {{! if its not an origin service we don't care as to whether connect }} {{! is enabled or not (we figure that out using the chain var) }} {{#if (or (not item.IsOrigin) this.chain)}} @@ -210,7 +210,7 @@ as |items item dc|}} {{outlet}} {{/if}} - +
{{/let}} {{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/show.hbs b/ui/packages/consul-ui/app/templates/dc/show.hbs index de36dc16497..747f42cb275 100644 --- a/ui/packages/consul-ui/app/templates/dc/show.hbs +++ b/ui/packages/consul-ui/app/templates/dc/show.hbs @@ -7,14 +7,14 @@ @name={{this.routeName}} as |route|> - + <:header>

-
- - - + + <:toolbar> + + <:nav> {{#let (from-entries (array @@ -59,15 +59,15 @@ as |tabs|}} {{/let}} {{/let}} - - + + <:content> {{outlet}} - +
diff --git a/ui/packages/consul-ui/app/templates/settings.hbs b/ui/packages/consul-ui/app/templates/settings.hbs index ef1d9c2fd82..ed6058e9a1a 100644 --- a/ui/packages/consul-ui/app/templates/settings.hbs +++ b/ui/packages/consul-ui/app/templates/settings.hbs @@ -25,12 +25,12 @@ as |route|> ) as |item|}} - + <:header>

-
- + + <:content> Local Storage These settings are immediately saved to local storage and persisted through browser usage. @@ -94,7 +94,7 @@ as |item|}} {{/if}} - +
{{/let}} From aaac170e2fc4178318d513c7c2ae110f5bdc3a86 Mon Sep 17 00:00:00 2001 From: Suresh Dunga Date: Thu, 16 Apr 2026 09:52:02 +0530 Subject: [PATCH 02/34] replace slotted for list-collection --- .../consul/auth-method/list/index.hbs | 9 +-- .../permission/header/list/index.hbs | 11 ++- .../intention/permission/list/index.hbs | 40 +++++----- .../consul/lock-session/list/index.hbs | 15 ++-- .../app/components/consul/node/list/index.hbs | 11 ++- .../components/consul/nspace/list/index.hbs | 13 ++- .../consul/partition/list/index.hbs | 15 ++-- .../app/components/consul/peer/list/index.hbs | 13 ++- .../components/consul/policy/list/index.hbs | 14 ++-- .../app/components/consul/role/list/index.hbs | 15 ++-- .../consul/service-instance/list/index.hbs | 11 ++- .../components/consul/service/list/index.hbs | 79 ++++++++++++++++++- .../components/consul/service/list/index.js | 25 ++++++ .../consul/service/list/item/index.hbs | 78 ------------------ .../components/consul/token/list/index.hbs | 14 ++-- .../components/consul/upstream/list/index.hbs | 11 ++- .../app/components/list-collection/index.hbs | 38 ++++----- .../components/list-collection-test.js | 10 +-- 18 files changed, 214 insertions(+), 208 deletions(-) create mode 100644 ui/packages/consul-ui/app/components/consul/service/list/index.js delete mode 100644 ui/packages/consul-ui/app/components/consul/service/list/item/index.hbs diff --git a/ui/packages/consul-ui/app/components/consul/auth-method/list/index.hbs b/ui/packages/consul-ui/app/components/consul/auth-method/list/index.hbs index e1e283f5a76..13c3c0201a3 100644 --- a/ui/packages/consul-ui/app/components/consul/auth-method/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/auth-method/list/index.hbs @@ -6,9 +6,8 @@ - + <:header as |item|> {{#if (not-eq item.DisplayName '')}} {{item.DisplayName}} @@ -18,8 +17,8 @@ {{item.Name}} {{/if}} - - + + <:details as |item|> {{#if (not-eq item.DisplayName '')}} {{item.Name}} @@ -35,5 +34,5 @@
{{item.MaxTokenTTL}}
{{/if}} - + diff --git a/ui/packages/consul-ui/app/components/consul/intention/permission/header/list/index.hbs b/ui/packages/consul-ui/app/components/consul/intention/permission/header/list/index.hbs index edd7bd36191..5ae2a916f58 100644 --- a/ui/packages/consul-ui/app/components/consul/intention/permission/header/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/intention/permission/header/list/index.hbs @@ -8,9 +8,8 @@ class="consul-intention-permission-header-list" @items={{@items}} @scroll="native" - @cellHeight={{42}} -as |item|> - + @cellHeight={{42}}> + <:details as |item|>
Header @@ -19,8 +18,8 @@ as |item|> {{item.Name}} {{route-match item}}
-
- + + <:actions as |item index Actions|> @@ -43,6 +42,6 @@ as |item|> - + {{/if}} \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/intention/permission/list/index.hbs b/ui/packages/consul-ui/app/components/consul/intention/permission/list/index.hbs index f05af03c5a2..a45642ace81 100644 --- a/ui/packages/consul-ui/app/components/consul/intention/permission/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/intention/permission/list/index.hbs @@ -8,9 +8,9 @@ class="consul-intention-permission-list{{if (not @onclick) ' readonly'}}" @scroll="native" @items={{@items}} - @partial={{5}} -as |item|> - + @showActions={{if @onclick true false}} + @partial={{5}}> + <:details as |item|>
{{#if (gt item.HTTP.Methods.length 0)}} @@ -46,37 +46,35 @@ as |item|>
{{/each}}
-
-{{#if @onclick}} - + + <:actions as |item index Actions|> - + <:label> Edit - + - + <:label> Delete - - + + <:confirmation as |Confirmation|> - + <:header> Confirm delete - - + + <:body>

Are you sure you want to delete this permission?

-
- + + <:confirm as |Confirm|> Delete - +
-
+
-
-{{/if}} + -{{/if}} \ No newline at end of file +{{/if}} diff --git a/ui/packages/consul-ui/app/components/consul/lock-session/list/index.hbs b/ui/packages/consul-ui/app/components/consul/lock-session/list/index.hbs index 77d22a3cd33..d7cf99daff6 100644 --- a/ui/packages/consul-ui/app/components/consul/lock-session/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/lock-session/list/index.hbs @@ -6,9 +6,8 @@ - + @items={{@items}}> + <:header as |item index|> {{#if item.Name}} {{item.Name}} {{else}} @@ -20,8 +19,8 @@ as |item index|> /> {{/if}} - - + + <:details as |item index|> {{#if item.Name}}
@@ -80,8 +79,8 @@ as |item index|>
{{/let}} -
- + + <:actions as |item index|> @@ -112,5 +111,5 @@ as |item index|> - +
\ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/node/list/index.hbs b/ui/packages/consul-ui/app/components/consul/node/list/index.hbs index 46469b8ae7c..77e855ee0b9 100644 --- a/ui/packages/consul-ui/app/components/consul/node/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/node/list/index.hbs @@ -5,9 +5,8 @@ - + @items={{@items}}> + <:header as |item index|>
Health @@ -33,8 +32,8 @@ as |item index|> {{item.Node}} - - + + <:details as |item index|> {{#if (eq item.Address @leader.Address)}} @@ -74,5 +73,5 @@ as |item index|> {{/if}}
-
+
diff --git a/ui/packages/consul-ui/app/components/consul/nspace/list/index.hbs b/ui/packages/consul-ui/app/components/consul/nspace/list/index.hbs index e872cd70e87..ba7d2b54a21 100644 --- a/ui/packages/consul-ui/app/components/consul/nspace/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/nspace/list/index.hbs @@ -8,9 +8,8 @@ ...attributes @items={{@items}} @linkable="linkable nspace" - as |item| > - + <:header as |item|> {{#if item.DeletedAt}}

Deleting @@ -22,8 +21,8 @@ href={{href-to "dc.nspaces.edit" item.Name}} >{{item.Name}} {{/if}} - - + + <:details as |item|> {{#if item.Description}}

Description
@@ -35,8 +34,8 @@ {{#if (env "CONSUL_ACLS_ENABLED")}} {{/if}} - - + + <:actions as |item index Actions|> {{#if (not item.DeletedAt)}} {{/if}} - + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/partition/list/index.hbs b/ui/packages/consul-ui/app/components/consul/partition/list/index.hbs index e350a7678f9..cded3205e15 100644 --- a/ui/packages/consul-ui/app/components/consul/partition/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/partition/list/index.hbs @@ -7,9 +7,8 @@ class="consul-partition-list" ...attributes @items={{@items}} - @linkable="linkable partition" -as |item|> - + @linkable="linkable partition"> + <:header as |item|> {{#if item.DeletedAt}}

Deleting {{item.Name}}... @@ -17,8 +16,8 @@ as |item|> {{else}} {{item.Name}} {{/if}} - - + + <:details as |item|> {{#if item.Description}}

Description
@@ -27,8 +26,8 @@ as |item|>
{{/if}} -
- + + <:actions as |item index Actions|> {{#if (not item.DeletedAt)}} @@ -60,5 +59,5 @@ as |item|> {{/if}} {{/if}} - + diff --git a/ui/packages/consul-ui/app/components/consul/peer/list/index.hbs b/ui/packages/consul-ui/app/components/consul/peer/list/index.hbs index 9fd4e40c371..a631b439087 100644 --- a/ui/packages/consul-ui/app/components/consul/peer/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/peer/list/index.hbs @@ -8,9 +8,8 @@ ...attributes @items={{@items}} @linkable="linkable peers" - as |item index| > - + <:header as |item index|> {{#if (can "delete peer" item=item)}} {{/if}} - - + + <:details as |item index|>
@@ -53,8 +52,8 @@
-
- + + <:actions as |item index Actions|> {{#if (can "delete peer" item=item)}} @@ -95,5 +94,5 @@ {{/if}} - + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/policy/list/index.hbs b/ui/packages/consul-ui/app/components/consul/policy/list/index.hbs index d2ed3dbdf4f..85bf83fe99f 100644 --- a/ui/packages/consul-ui/app/components/consul/policy/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/policy/list/index.hbs @@ -3,8 +3,8 @@ SPDX-License-Identifier: BUSL-1.1 }} - - + + <:header as |item|> {{#if (or (eq (policy/typeof item) 'policy-management') (eq (policy/typeof item) 'read-only'))}}
Type
@@ -22,8 +22,8 @@ href={{href-to 'dc.acls.policies.edit' item.ID}} class={{if (eq (policy/typeof item) 'policy-management') 'is-management'}} >{{item.Name}}
- - + + <:details as |item|>
Datacenters @@ -38,8 +38,8 @@ {{item.Description}}
-
- + + <:actions as |item index Actions|> @@ -69,5 +69,5 @@ {{/if}} - + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/role/list/index.hbs b/ui/packages/consul-ui/app/components/consul/role/list/index.hbs index 961e4dd336b..6b1f0f52505 100644 --- a/ui/packages/consul-ui/app/components/consul/role/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/role/list/index.hbs @@ -6,12 +6,11 @@ - + @items={{@items}}> + <:header as |item|> {{item.Name}} - - + + <:details as |item|>
Description
@@ -19,8 +18,8 @@ as |item|> {{item.Description}}
-
- + + <:actions as |item index Actions|> @@ -50,5 +49,5 @@ as |item|> {{/if}} - +
\ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/service-instance/list/index.hbs b/ui/packages/consul-ui/app/components/consul/service-instance/list/index.hbs index 4ded3d2079a..097d0ff8672 100644 --- a/ui/packages/consul-ui/app/components/consul/service-instance/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/service-instance/list/index.hbs @@ -10,10 +10,9 @@ as |proxies|}} - + ...attributes> + <:header as |item index|> {{#if (eq @routeName "dc.services.show")}} {{item.Service.ID}} @@ -23,8 +22,8 @@ as |item index|> {{item.Service.ID}} {{/if}} - - + + <:details as |item index|> {{#let (get proxies item.Service.ID) @@ -111,6 +110,6 @@ as |proxy|}} {{/let}} {{/let}} - + {{/let}} diff --git a/ui/packages/consul-ui/app/components/consul/service/list/index.hbs b/ui/packages/consul-ui/app/components/consul/service/list/index.hbs index 36f5467c210..0edf762666c 100644 --- a/ui/packages/consul-ui/app/components/consul/service/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/service/list/index.hbs @@ -5,10 +5,81 @@ - - + <:header as |item|> +
+
+ Health +
+
+
+ {{#if (gt item.InstanceCount 0)}} + + {{item.Name}} + + {{else}} +

+ {{item.Name}} +

+ {{/if}} + + <:details as |item|> + + + {{#if + (and + (not-eq item.InstanceCount 0) + (and (not-eq item.Kind 'terminating-gateway') (not-eq item.Kind 'ingress-gateway')) + ) + }} + + {{format-number item.InstanceCount}} + {{pluralize item.InstanceCount 'instance' without-count=true}} + + {{/if}} + {{! we are displaying imported-services - don't show bucket-list }} + {{#unless @isPeerDetail}} + + {{/unless}} + {{#if (eq item.Kind 'terminating-gateway')}} + + {{format-number item.GatewayConfig.AssociatedServiceCount}} + {{pluralize item.GatewayConfig.AssociatedServiceCount 'linked service' without-count=true}} + + {{else if (eq item.Kind 'ingress-gateway')}} + + {{format-number item.GatewayConfig.AssociatedServiceCount}} + {{pluralize item.GatewayConfig.AssociatedServiceCount 'upstream' without-count=true}} + + {{/if}} + {{#if (or item.ConnectedWithGateway item.ConnectedWithProxy)}} +
+
+ + This service uses a proxy for the Consul service mesh + +
+ {{#if (and item.ConnectedWithGateway item.ConnectedWithProxy)}} +
+ in service mesh with proxy and gateway +
+ {{else if item.ConnectedWithProxy}} +
+ in service mesh with proxy +
+ {{else if item.ConnectedWithGateway}} +
+ in service mesh with gateway +
+ {{/if}} +
+ {{/if}} + + + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/service/list/index.js b/ui/packages/consul-ui/app/components/consul/service/list/index.js new file mode 100644 index 00000000000..6835ae0f0cb --- /dev/null +++ b/ui/packages/consul-ui/app/components/consul/service/list/index.js @@ -0,0 +1,25 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: BUSL-1.1 + */ + +import Component from '@glimmer/component'; + +export default class ConsulServiceList extends Component { + linkParams = (item) => { + const hash = {}; + + if (item.Partition && this.args.partition !== item.Partition) { + hash.partition = item.Partition; + hash.nspace = this.args.Namespace; + } else if (item.Namespace && this.args.nspace !== item.Namespace) { + hash.nspace = item.Namespace; + } + + if (item.PeerName) { + hash.peer = item.PeerName; + } + + return hash; + }; +} diff --git a/ui/packages/consul-ui/app/components/consul/service/list/item/index.hbs b/ui/packages/consul-ui/app/components/consul/service/list/item/index.hbs deleted file mode 100644 index 3cfdb5b03b7..00000000000 --- a/ui/packages/consul-ui/app/components/consul/service/list/item/index.hbs +++ /dev/null @@ -1,78 +0,0 @@ -{{! - Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: BUSL-1.1 -}} - - -
-
- Health -
-
-
- {{#if (gt @item.InstanceCount 0)}} - - {{@item.Name}} - - {{else}} -

- {{@item.Name}} -

- {{/if}} -
- - - - {{#if - (and - (not-eq @item.InstanceCount 0) - (and (not-eq @item.Kind 'terminating-gateway') (not-eq @item.Kind 'ingress-gateway')) - ) - }} - - {{format-number @item.InstanceCount}} - {{pluralize @item.InstanceCount 'instance' without-count=true}} - - {{/if}} - {{! we are displaying imported-services - don't show bucket-list }} - {{#unless @isPeerDetail}} - - {{/unless}} - {{#if (eq @item.Kind 'terminating-gateway')}} - - {{format-number @item.GatewayConfig.AssociatedServiceCount}} - {{pluralize @item.GatewayConfig.AssociatedServiceCount 'linked service' without-count=true}} - - {{else if (eq @item.Kind 'ingress-gateway')}} - - {{format-number @item.GatewayConfig.AssociatedServiceCount}} - {{pluralize @item.GatewayConfig.AssociatedServiceCount 'upstream' without-count=true}} - - {{/if}} - {{#if (or @item.ConnectedWithGateway @item.ConnectedWithProxy)}} -
-
- {{#if (and @item.ConnectedWithGateway @item.ConnectedWithProxy)}} -
- in service mesh with proxy and gateway -
- {{else if @item.ConnectedWithProxy}} -
- in service mesh with proxy -
- {{else if @item.ConnectedWithGateway}} -
- in service mesh with gateway -
- {{/if}} -
- {{/if}} - -
\ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/token/list/index.hbs b/ui/packages/consul-ui/app/components/consul/token/list/index.hbs index 7f333656efc..1956bfbc1cf 100644 --- a/ui/packages/consul-ui/app/components/consul/token/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/token/list/index.hbs @@ -3,8 +3,8 @@ SPDX-License-Identifier: BUSL-1.1 }} - - + + <:header as |item|> {{#if (eq item.AccessorID @token.AccessorID)}}
@@ -22,8 +22,8 @@ {{substr item.AccessorID -8}} {{/if}} - - + + <:details as |item|>
Scope
@@ -37,8 +37,8 @@ {{or item.Description item.Name}}
-
- + + <:actions as |item index Actions|> {{#if item.hasSecretID}} {{t 'components.consul.token.secretID'}} @@ -118,5 +118,5 @@ {{/if}} - + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/upstream/list/index.hbs b/ui/packages/consul-ui/app/components/consul/upstream/list/index.hbs index 9e405174481..387345a8960 100644 --- a/ui/packages/consul-ui/app/components/consul/upstream/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/upstream/list/index.hbs @@ -7,9 +7,8 @@ class="consul-upstream-list" ...attributes @items={{@items}} - @linkable="linkable upstream" -as |item index|> - + @linkable="linkable upstream"> + <:header as |item index|> {{#if (gt item.InstanceCount 0)}}
@@ -53,8 +52,8 @@ as |item index|> {{item.Name}}

{{/if}} - - + + <:details as |item index|>
{{/each}} -
+ diff --git a/ui/packages/consul-ui/app/components/list-collection/index.hbs b/ui/packages/consul-ui/app/components/list-collection/index.hbs index fc2658e7fab..54b26adef56 100644 --- a/ui/packages/consul-ui/app/components/list-collection/index.hbs +++ b/ui/packages/consul-ui/app/components/list-collection/index.hbs @@ -29,17 +29,17 @@ onclick={{action 'click'}} style={{{cell.style}}} class={{if @linkable (if (is @linkable item=cell.item) 'linkable')}} > -
{{yield cell.item cell.index}}
-
{{yield cell.item cell.index}}
- + {{#if (has-block "header")}} +
{{yield cell.item cell.index to="header"}}
+ {{/if}} + {{#if (has-block "details")}} +
{{yield cell.item cell.index to="details"}}
+ {{/if}} + {{#if (and (not-eq @showActions false) (has-block "actions"))}}
- {{yield cell.item cell.index}} + {{yield cell.item cell.index (component 'more-popover-menu' expanded=(if (eq this.checked cell.item.uid) true false) onchange=(action "change" cell.item.uid)) to="actions"}}
-
+ {{/if}} {{~/each~}} @@ -53,17 +53,17 @@ onclick={{action 'click'}} class={{if (not @linkable) 'linkable' (if (is @linkable item=item) 'linkable')}} > -
{{yield item index}}
-
{{yield item index}}
- + {{#if (has-block "header")}} +
{{yield item index to="header"}}
+ {{/if}} + {{#if (has-block "details")}} +
{{yield item index to="details"}}
+ {{/if}} + {{#if (and (not-eq @showActions false) (has-block "actions"))}}
- {{yield item index}} + {{yield item index (component 'more-popover-menu' onchange=(action "change" item.uid)) to="actions"}}
-
+ {{/if}} {{~/each~}} @@ -85,4 +85,4 @@ {{/let}} {{/if}} - \ No newline at end of file + diff --git a/ui/packages/consul-ui/tests/integration/components/list-collection-test.js b/ui/packages/consul-ui/tests/integration/components/list-collection-test.js index 87e7e5acd87..02ded5622da 100644 --- a/ui/packages/consul-ui/tests/integration/components/list-collection-test.js +++ b/ui/packages/consul-ui/tests/integration/components/list-collection-test.js @@ -42,21 +42,21 @@ module('Integration | Component | list collection', function (hooks) { document.body.appendChild(footer); await render(hbs` - - {{item.name}} - + + <:header as |item|>{{item.name}} + <:actions as |item index Actions|> Action - + `); const checkbox = this.element.querySelector('input[type="checkbox"]'); const row = this.element.querySelector('[data-test-list-row]'); - + console.log('testing',checkbox); // Test checking - should set z-index and handle footer collision checkbox.checked = true; await triggerEvent(checkbox, 'change'); From f93ecbf1546fe53585db38bba43f44b1974d25cb Mon Sep 17 00:00:00 2001 From: Suresh Dunga Date: Thu, 16 Apr 2026 10:05:49 +0530 Subject: [PATCH 03/34] replaces slots for data-form --- .../components/consul/intention/form/index.hbs | 10 +++++----- .../app/components/consul/kv/form/index.hbs | 5 ++--- .../consul-ui/app/components/data-form/index.hbs | 16 +++++++++++----- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/ui/packages/consul-ui/app/components/consul/intention/form/index.hbs b/ui/packages/consul-ui/app/components/consul/intention/form/index.hbs index 2501bf22208..2993e0716fe 100644 --- a/ui/packages/consul-ui/app/components/consul/intention/form/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/intention/form/index.hbs @@ -17,9 +17,9 @@ @src={{@src}} @onchange={{action this.change}} @onsubmit={{action this.onsubmit}} -as |api|> +> - + <:error as |after err api|> {{#if (string-starts-with api.error.detail 'duplicate intention found:')}} {{/if}} - + - + <:form as |api|> {{#let api.data (not (can 'write intention' item=api.data)) @@ -215,6 +215,6 @@ as |item readonly|}} {{/if}} {{/let}} - + diff --git a/ui/packages/consul-ui/app/components/consul/kv/form/index.hbs b/ui/packages/consul-ui/app/components/consul/kv/form/index.hbs index 4757add53db..70c5860a7a4 100644 --- a/ui/packages/consul-ui/app/components/consul/kv/form/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/kv/form/index.hbs @@ -14,9 +14,8 @@ @src={{@src}} @onchange={{action 'change'}} @onsubmit={{action (or @onsubmit this.onsubmit)}} - as |api| > - + <:content as |api|> {{#let (cannot 'write kv' item=api.data) as |disabld|}}
@@ -143,5 +142,5 @@ {{/let}} - + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/data-form/index.hbs b/ui/packages/consul-ui/app/components/data-form/index.hbs index a3f792396bb..47955393db5 100644 --- a/ui/packages/consul-ui/app/components/data-form/index.hbs +++ b/ui/packages/consul-ui/app/components/data-form/index.hbs @@ -48,17 +48,23 @@ {{yield api}} {{#if this.hasError}} - - + + {{#if (has-block "error")}} + {{yield after err api to="error"}} + {{else}} {{yield api}} - + {{/if}} {{/if}} - + {{#if (has-block "form")}} + {{yield api to="form"}} + {{else if (has-block "content")}} + {{yield api to="content"}} + {{else}} {{yield api}} - + {{/if}} {{/let}} From 37f550dd4326ddeb7ec62452ac79200a80227c58 Mon Sep 17 00:00:00 2001 From: Suresh Dunga Date: Sat, 18 Apr 2026 19:27:14 +0530 Subject: [PATCH 04/34] replaces slotted for data writer --- .../consul/lock-session/form/index.hbs | 15 +++--- .../components/consul/nspace/form/index.hbs | 9 ++-- .../consul/partition/form/index.hbs | 19 ++++--- .../consul/peer/form/initiate/index.hbs | 9 ++-- .../app/components/data-form/index.hbs | 52 +++++++++++++------ .../app/components/data-writer/index.hbs | 28 +++++----- .../app/templates/dc/intentions/index.hbs | 7 ++- .../consul-ui/app/templates/dc/kv/index.hbs | 7 ++- .../app/templates/dc/nodes/show/sessions.hbs | 15 +++--- .../app/templates/dc/nspaces/index.hbs | 11 ++-- .../app/templates/dc/partitions/index.hbs | 11 ++-- .../app/templates/dc/peers/index.hbs | 9 ++-- .../dc/services/show/intentions/index.hbs | 7 ++- 13 files changed, 105 insertions(+), 94 deletions(-) diff --git a/ui/packages/consul-ui/app/components/consul/lock-session/form/index.hbs b/ui/packages/consul-ui/app/components/consul/lock-session/form/index.hbs index 8620fd8631f..b05c6341a06 100644 --- a/ui/packages/consul-ui/app/components/consul/lock-session/form/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/lock-session/form/index.hbs @@ -20,17 +20,16 @@ @type='session' @label='Lock Session' @ondelete={{fn (if @ondelete @ondelete @onsubmit) @item}} - @onchange={{fn (optional @onsubmit) @item}} - as |writer|> - + @onchange={{fn (optional @onsubmit) @item}}> + <:removed as |after|> - - + + <:error as |after error writer|> - - + + <:content as |writer|>
@@ -109,6 +108,6 @@ {{/if}} - +
\ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/nspace/form/index.hbs b/ui/packages/consul-ui/app/components/consul/nspace/form/index.hbs index 32000cce6d5..9abee4b143c 100644 --- a/ui/packages/consul-ui/app/components/consul/nspace/form/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/nspace/form/index.hbs @@ -13,16 +13,15 @@ @label="Namespace" @ondelete={{fn this.onDelete @item}} @onchange={{fn this.onSubmit @item}} - as |writer| > - + <:removed as |after|> - + - + <:content as |writer|> {{#let (not (can "write nspaces")) @@ -162,6 +161,6 @@ {{/let}} - + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/partition/form/index.hbs b/ui/packages/consul-ui/app/components/consul/partition/form/index.hbs index c39d5db6896..096fa92cd33 100644 --- a/ui/packages/consul-ui/app/components/consul/partition/form/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/partition/form/index.hbs @@ -19,21 +19,20 @@ @type='partition' @label='Partition' @ondelete={{fn (if @ondelete @ondelete @onsubmit) @item}} - @onchange={{fn (optional @onsubmit) @item}} - as |writer|> - - + <:removed as |after|> + - + - + <:content as |writer|> + +{{#let -{{#let - (not (can "write partition")) @item @@ -58,7 +57,7 @@ as |readOnly item Name Description|}} {{disabled readOnly}} > - @@ -137,6 +136,6 @@ as |State Guard ChartAction dispatch state|> {{/let}} - + diff --git a/ui/packages/consul-ui/app/components/consul/peer/form/initiate/index.hbs b/ui/packages/consul-ui/app/components/consul/peer/form/initiate/index.hbs index cd297d3dcbf..2dcd08e8f8e 100644 --- a/ui/packages/consul-ui/app/components/consul/peer/form/initiate/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/peer/form/initiate/index.hbs @@ -16,15 +16,14 @@ @type="peer" @label="peer" @onchange={{fn (optional @onsubmit) @item}} - as |writer| > - + <:error as |after error writer |> Error {{error.message}} - - + + <:content as |writer|> {{#let (dom-guid) as |id|}}
{{yield @@ -39,6 +38,6 @@ }}
{{/let}} -
+ \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/data-form/index.hbs b/ui/packages/consul-ui/app/components/data-form/index.hbs index 47955393db5..14d1341314d 100644 --- a/ui/packages/consul-ui/app/components/data-form/index.hbs +++ b/ui/packages/consul-ui/app/components/data-form/index.hbs @@ -33,9 +33,8 @@ @type={{@type}} @label={{@label}} @ondelete={{action this.ondelete}} - @onchange={{action this.onsubmit}} - as |writer|> - + @onchange={{action this.onsubmit}}> + <:error as |after err writer|> {{#let (hash data=this.data change=(action "change") @@ -46,18 +45,39 @@ delete=(action writer.delete this.data) ) as |api|}} - {{yield api}} - {{#if this.hasError}} - - {{#if (has-block "error")}} - {{yield after err api to="error"}} - {{else}} - {{yield api}} - {{/if}} - + {{#if (has-block "error")}} + {{yield after err api to="error"}} + {{else}} + + Error! + There was an error saving your {{or @label @type}}. + {{#if (and api.error.status api.error.detail)}} +
{{api.error.status}}: {{api.error.detail}} + {{else if api.error.message}} +
{{api.error.message}} + {{/if}} +
+
{{/if}} - +{{/let}} + + + <:content as |writer|> +{{#let (hash + data=this.data + change=(action "change") + isCreate=this.create + error=writer.error + disabled=writer.inflight + submit=(action writer.persist this.data) + delete=(action writer.delete this.data) +) as |api|}} + {{yield api}} {{#if (has-block "form")}} {{yield api to="form"}} {{else if (has-block "content")}} @@ -65,11 +85,9 @@ {{else}} {{yield api}} {{/if}} - - {{/let}} - +
- \ No newline at end of file + diff --git a/ui/packages/consul-ui/app/components/data-writer/index.hbs b/ui/packages/consul-ui/app/components/data-writer/index.hbs index 4ff69260722..0c969fc4bce 100644 --- a/ui/packages/consul-ui/app/components/data-writer/index.hbs +++ b/ui/packages/consul-ui/app/components/data-writer/index.hbs @@ -41,8 +41,8 @@ {{#let (queue (action dispatch "RESET") (action this.ondelete)) as |after|}} - {{#yield-slot name="removed" params=(block-params after)}} - {{yield api}} + {{#if (has-block "removed")}} + {{yield after to="removed"}} {{else}} Success! Your {{or @label @type}} has been deleted. - {{/yield-slot}} + {{/if}} {{/let}} @@ -60,8 +60,8 @@ as |after|}} {{#let (action this.onchange) as |after|}} - {{#yield-slot name="persisted" params=(block-params after)}} - {{yield api}} + {{#if (has-block "persisted")}} + {{yield after to="persisted"}} {{else}} Success! Your {{or @label @type}} has been saved. - {{/yield-slot}} + {{/if}} {{/let}} @@ -79,8 +79,8 @@ as |after|}} {{#let (action dispatch "RESET") as |after|}} - {{#yield-slot name="error" params=(block-params after api.error)}} - {{yield api}} + {{#if (has-block "error")}} + {{yield after api.error api to="error"}} {{else}} - {{/yield-slot}} + {{/if}} {{/let}} - + {{#if (has-block "content")}} + {{log 'hello content with block'}} + {{yield api to="content"}} + {{else}} + {{log 'hello content without block'}} {{yield api}} - + {{/if}} {{/let}} - \ No newline at end of file + diff --git a/ui/packages/consul-ui/app/templates/dc/intentions/index.hbs b/ui/packages/consul-ui/app/templates/dc/intentions/index.hbs index 73b37cac4ca..8d12477e11a 100644 --- a/ui/packages/consul-ui/app/templates/dc/intentions/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/intentions/index.hbs @@ -92,9 +92,8 @@ as |route|> }} @type="intention" @ondelete={{refreshRoute}} - @onchange={{refreshRoute}} - as |writer|> - + @onchange={{refreshRoute}}> + <:content as |writer|> - + {{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/kv/index.hbs b/ui/packages/consul-ui/app/templates/dc/kv/index.hbs index 4dce98aa737..6e5dfbbe60d 100644 --- a/ui/packages/consul-ui/app/templates/dc/kv/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/kv/index.hbs @@ -149,9 +149,8 @@ as |sort filters parent items|}} }} @type="kv" @label="key" - @ondelete={{refreshRoute}} - as |writer|> - + @ondelete={{refreshRoute}}> + <:content as |writer|> - + {{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/nodes/show/sessions.hbs b/ui/packages/consul-ui/app/templates/dc/nodes/show/sessions.hbs index 9785d7f350f..b55a85c02c1 100644 --- a/ui/packages/consul-ui/app/templates/dc/nodes/show/sessions.hbs +++ b/ui/packages/consul-ui/app/templates/dc/nodes/show/sessions.hbs @@ -35,19 +35,18 @@ as |route|> }} @type="session" @label="Lock Session" - @ondelete={{refreshRoute}} - as |writer|> + @ondelete={{refreshRoute}}> - + <:removed as |after|> - + - + <:error as |after error writer |> @type="remove" @error={{error}} /> - + - + <:content as |writer|> - + {{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/nspaces/index.hbs b/ui/packages/consul-ui/app/templates/dc/nspaces/index.hbs index 4690ee7d107..9fdbee4963f 100644 --- a/ui/packages/consul-ui/app/templates/dc/nspaces/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/nspaces/index.hbs @@ -85,17 +85,16 @@ as |route|> }} @type="nspace" @label="Namespace" - @ondelete={{refreshRoute}} - as |writer|> - + @ondelete={{refreshRoute}}> + <:removed as |writer after|> - - + + <:content as |writer|> - + {{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/partitions/index.hbs b/ui/packages/consul-ui/app/templates/dc/partitions/index.hbs index f35728b36b6..920c37fb48a 100644 --- a/ui/packages/consul-ui/app/templates/dc/partitions/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/partitions/index.hbs @@ -85,17 +85,16 @@ as |route|> }} @type="partition" @label="Partition" - @ondelete={{refreshRoute}} - as |writer|> - + @ondelete={{refreshRoute}}> + <:removed as |writer after|> - - + + <:content as |writer|> - + {{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/peers/index.hbs b/ui/packages/consul-ui/app/templates/dc/peers/index.hbs index 7de7d8b9920..c2d9ddd10e8 100644 --- a/ui/packages/consul-ui/app/templates/dc/peers/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/peers/index.hbs @@ -116,16 +116,15 @@ }} @type="peer" @label="Peer" - as |writer| > - + <:removed as |after|> - - + + <:content as |writer|> - + diff --git a/ui/packages/consul-ui/app/templates/dc/services/show/intentions/index.hbs b/ui/packages/consul-ui/app/templates/dc/services/show/intentions/index.hbs index 0a4847a6fc1..8af439e568b 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show/intentions/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show/intentions/index.hbs @@ -77,9 +77,8 @@ as |route|> ) }} @type="intention" - @ondelete={{refreshRoute}} - as |writer|> - + @ondelete={{refreshRoute}}> + <:content as |writer|> - + {{/let}} From 8c4f31e9b33c38436e5c3c3ce8bc75c095748216 Mon Sep 17 00:00:00 2001 From: Suresh Dunga Date: Sat, 18 Apr 2026 20:16:24 +0530 Subject: [PATCH 05/34] replaces slotted for tabular collection --- .../consul/intention/list/table/index.hbs | 13 +++--- .../app/components/consul/kv/list/index.hbs | 14 +++--- .../components/consul/metadata/list/index.hbs | 10 ++--- .../app/components/role-selector/index.hbs | 14 +++--- .../components/tabular-collection/index.hbs | 20 ++++----- .../components/tabular-collection/index.js | 8 +--- .../app/components/token-list/index.hbs | 44 ++++++++++--------- .../dc/services/instance/addresses.hbs | 10 ++--- 8 files changed, 63 insertions(+), 70 deletions(-) diff --git a/ui/packages/consul-ui/app/components/consul/intention/list/table/index.hbs b/ui/packages/consul-ui/app/components/consul/intention/list/table/index.hbs index 1c95386d027..8782a84a193 100644 --- a/ui/packages/consul-ui/app/components/consul/intention/list/table/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/intention/list/table/index.hbs @@ -8,9 +8,8 @@ ...attributes @items={{@items}} @rowHeight={{59}} - as |item index| > - + <:header> Source Intention Type Destination @@ -19,8 +18,8 @@ Status - - + + <:row as |item index|> {{/if}} - - + + <:actions as |item index change checked|> - + diff --git a/ui/packages/consul-ui/app/components/consul/kv/list/index.hbs b/ui/packages/consul-ui/app/components/consul/kv/list/index.hbs index ab50e4145fe..83e25f6ab11 100644 --- a/ui/packages/consul-ui/app/components/consul/kv/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/kv/list/index.hbs @@ -3,19 +3,19 @@ SPDX-License-Identifier: BUSL-1.1 }} - - + + <:header> Name - - + + <:row as |item index|> {{right-trim (left-trim item.Key @parent.Key) '/' }} - - + + <:actions as |item index change checked|> - + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/metadata/list/index.hbs b/ui/packages/consul-ui/app/components/consul/metadata/list/index.hbs index cc4e8c4645b..3c31bed1f26 100644 --- a/ui/packages/consul-ui/app/components/consul/metadata/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/metadata/list/index.hbs @@ -6,13 +6,13 @@ diff --git a/ui/packages/consul-ui/app/components/role-selector/index.hbs b/ui/packages/consul-ui/app/components/role-selector/index.hbs index 944b4e0ede8..a7a52c95243 100644 --- a/ui/packages/consul-ui/app/components/role-selector/index.hbs +++ b/ui/packages/consul-ui/app/components/role-selector/index.hbs @@ -135,21 +135,21 @@ as |modal|> - + <:header> Name Description - - + + <:row as |item index|> {{item.Name}} {{item.Description}} - - + + <:actions as |item index change checked|> More @@ -183,7 +183,7 @@ as |modal|> {{/if}} - + diff --git a/ui/packages/consul-ui/app/components/tabular-collection/index.hbs b/ui/packages/consul-ui/app/components/tabular-collection/index.hbs index 544b8a75a40..0a81c5c66ab 100644 --- a/ui/packages/consul-ui/app/components/tabular-collection/index.hbs +++ b/ui/packages/consul-ui/app/components/tabular-collection/index.hbs @@ -4,7 +4,7 @@ }} {{on-window 'resize' (action "resize") }} {{yield}} -{{#if this.hasCaption}} - +{{#if (has-block "caption")}} + {{/if}} - {{yield}} -{{#if this.hasActions }} + {{yield to="header"}} +{{#if (has-block 'actions')}} {{/if}} @@ -28,15 +28,13 @@ {{~#each this._cells as |cell index|~}} - {{yield cell.item index}} -{{#if this.hasActions }} + {{yield cell.item index to="row"}} +{{#if (has-block 'actions')}} {{/if}} {{~/each~}} -
{{yield}}{{yield to="caption"}}
Actions
- - {{yield cell.item index}} - + {{yield cell.item cell.index (action "change") this.checked to="actions"}}
\ No newline at end of file + diff --git a/ui/packages/consul-ui/app/components/tabular-collection/index.js b/ui/packages/consul-ui/app/components/tabular-collection/index.js index c8d712496c1..16e777303ec 100644 --- a/ui/packages/consul-ui/app/components/tabular-collection/index.js +++ b/ui/packages/consul-ui/app/components/tabular-collection/index.js @@ -8,11 +8,10 @@ import { computed, set } from '@ember/object'; import CollectionComponent from 'ember-collection/components/ember-collection'; import needsRevalidate from 'ember-collection/utils/needs-revalidate'; import Grid from 'ember-collection/layouts/grid'; -import Slotted from 'block-slots'; const formatItemStyle = Grid.prototype.formatItemStyle; -export default CollectionComponent.extend(Slotted, { +export default CollectionComponent.extend({ tagName: '', dom: service('dom'), width: 1150, @@ -59,11 +58,6 @@ export default CollectionComponent.extend(Slotted, { }, }), - willRender: function () { - this._super(...arguments); - set(this, 'hasCaption', this._isRegistered('caption')); - set(this, 'hasActions', this._isRegistered('actions')); - }, // `ember-collection` bug workaround // https://github.com/emberjs/ember-collection/issues/138 _needsRevalidate: function () { diff --git a/ui/packages/consul-ui/app/components/token-list/index.hbs b/ui/packages/consul-ui/app/components/token-list/index.hbs index 0196ad2b216..7e766828475 100644 --- a/ui/packages/consul-ui/app/components/token-list/index.hbs +++ b/ui/packages/consul-ui/app/components/token-list/index.hbs @@ -9,26 +9,28 @@ data-test-tokens class="token-list" @rows={{5}} - @items={{sort-by 'AccessorID:asc' @items}} as |item index| + @items={{sort-by 'AccessorID:asc' @items}} > - {{#if @caption}} - {{@caption}} - {{/if}} - - AccessorID - Scope - Description - - - - {{truncate item.AccessorID 8 false}} - - - {{if item.Local 'local' 'global'}} - - -

{{item.Description}}

- -
+ <:caption> + {{#if @caption}} + {{@caption}} + {{/if}} + + <:header> + AccessorID + Scope + Description + + <:row as |item index|> + + {{truncate item.AccessorID 8 false}} + + + {{if item.Local 'local' 'global'}} + + +

{{item.Description}}

+ + -{{/if}} \ No newline at end of file +{{/if}} diff --git a/ui/packages/consul-ui/app/templates/dc/services/instance/addresses.hbs b/ui/packages/consul-ui/app/templates/dc/services/instance/addresses.hbs index f570d97fb1d..384abbd5172 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/instance/addresses.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/instance/addresses.hbs @@ -14,13 +14,13 @@ as |items|}} - + <:header> Tag Address - - + + <:row as |taggedAddress index|> {{#let (object-at 1 taggedAddress) as |address|}} {{object-at 0 taggedAddress}}{{#if (and (eq address.Address route.model.item.Address) (eq address.Port route.model.item.Port))}} (default){{/if}} @@ -29,7 +29,7 @@ as |items|}} {{address.Address}}:{{address.Port}} {{/let}} - + {{else}}

From ac2f609aa95165df9bacfc166d5a6999e682b44a Mon Sep 17 00:00:00 2001 From: Suresh Dunga Date: Sat, 18 Apr 2026 20:23:18 +0530 Subject: [PATCH 06/34] replaces slotted for tabular details --- .../app/components/policy-selector/index.hbs | 13 ++++++------- .../app/components/tabular-details/index.hbs | 8 +++----- .../app/components/tabular-details/index.js | 3 +-- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/ui/packages/consul-ui/app/components/policy-selector/index.hbs b/ui/packages/consul-ui/app/components/policy-selector/index.hbs index 7028c710cd3..c0836d35e02 100644 --- a/ui/packages/consul-ui/app/components/policy-selector/index.hbs +++ b/ui/packages/consul-ui/app/components/policy-selector/index.hbs @@ -83,12 +83,11 @@ data-test-policies @onchange={{action 'open'}} @items={{sort-by 'CreateTime:desc' 'Name:asc' @items}} - as |item index| > - + <:header> Name - - + + <:row as |item index|> {{#if item.ID}} {{item.Name}} @@ -96,8 +95,8 @@ {{item.Name}} {{/if}} - - + + <:details as |item index|> {{#if (eq item.template '')}} {{/if}} - + diff --git a/ui/packages/consul-ui/app/components/tabular-details/index.hbs b/ui/packages/consul-ui/app/components/tabular-details/index.hbs index a7a9b590bd9..66b34b4f693 100644 --- a/ui/packages/consul-ui/app/components/tabular-details/index.hbs +++ b/ui/packages/consul-ui/app/components/tabular-details/index.hbs @@ -7,7 +7,7 @@ - {{yield}} + {{yield to="header"}} @@ -15,7 +15,7 @@ {{#let (concat 'tabular-details-' @name '-toggle-' this.guid '_') as |inputId|}} {{#each @items as |item index|}} - {{yield item index}} + {{yield item index to="row"}} @@ -26,9 +26,7 @@
- - {{yield item index}} - + {{yield item index to="details"}}
diff --git a/ui/packages/consul-ui/app/components/tabular-details/index.js b/ui/packages/consul-ui/app/components/tabular-details/index.js index 471da2ad627..0e36729bd09 100644 --- a/ui/packages/consul-ui/app/components/tabular-details/index.js +++ b/ui/packages/consul-ui/app/components/tabular-details/index.js @@ -5,9 +5,8 @@ import Component from '@ember/component'; import { inject as service } from '@ember/service'; -import Slotted from 'block-slots'; -export default Component.extend(Slotted, { +export default Component.extend({ dom: service('dom'), onchange: function () {}, init: function () { From 19819d6eeb9561014a66012817e7d9d3a7974f49 Mon Sep 17 00:00:00 2001 From: Suresh Dunga Date: Sat, 18 Apr 2026 21:04:41 +0530 Subject: [PATCH 07/34] replaces slotted for data loader --- .../app/components/data-form/index.hbs | 4 +-- .../app/components/data-loader/index.hbs | 36 +++++++++---------- .../app/components/data-loader/index.js | 3 +- .../templates/dc/acls/auth-methods/index.hbs | 11 +++--- .../templates/dc/acls/auth-methods/show.hbs | 12 +++---- .../acls/auth-methods/show/binding-rules.hbs | 14 ++++---- .../app/templates/dc/acls/policies/edit.hbs | 11 +++--- .../app/templates/dc/acls/policies/index.hbs | 11 +++--- .../app/templates/dc/acls/roles/edit.hbs | 11 +++--- .../app/templates/dc/acls/roles/index.hbs | 11 +++--- .../app/templates/dc/acls/tokens/edit.hbs | 11 +++--- .../app/templates/dc/acls/tokens/index.hbs | 11 +++--- .../app/templates/dc/intentions/edit.hbs | 11 +++--- .../app/templates/dc/intentions/index.hbs | 11 +++--- .../consul-ui/app/templates/dc/kv/edit.hbs | 11 +++--- .../consul-ui/app/templates/dc/kv/index.hbs | 15 ++++---- .../app/templates/dc/nodes/index.hbs | 9 +++-- .../consul-ui/app/templates/dc/nodes/show.hbs | 15 ++++---- .../app/templates/dc/nodes/show/sessions.hbs | 10 +++--- .../app/templates/dc/nspaces/edit.hbs | 11 +++--- .../app/templates/dc/nspaces/index.hbs | 11 +++--- .../app/templates/dc/partitions/edit.hbs | 11 +++--- .../app/templates/dc/partitions/index.hbs | 11 +++--- .../app/templates/dc/peers/index.hbs | 9 +++-- .../consul-ui/app/templates/dc/peers/show.hbs | 9 +++-- .../app/templates/dc/peers/show/exported.hbs | 26 +++++++------- .../app/templates/dc/peers/show/imported.hbs | 9 +++-- .../app/templates/dc/routing-config.hbs | 11 +++--- .../app/templates/dc/services/index.hbs | 10 +++--- .../app/templates/dc/services/instance.hbs | 13 ++++--- .../app/templates/dc/services/show.hbs | 15 ++++---- .../dc/services/show/intentions/edit.hbs | 11 +++--- .../dc/services/show/intentions/index.hbs | 11 +++--- .../templates/dc/services/show/routing.hbs | 10 +++--- .../templates/dc/services/show/services.hbs | 10 +++--- .../templates/dc/services/show/topology.hbs | 10 +++--- .../templates/dc/services/show/upstreams.hbs | 10 +++--- .../app/templates/dc/show/license.hbs | 21 ++++++----- .../app/templates/dc/show/serverstatus.hbs | 21 ++++++----- .../consul-ui/app/templates/settings.hbs | 11 +++--- 40 files changed, 227 insertions(+), 262 deletions(-) diff --git a/ui/packages/consul-ui/app/components/data-form/index.hbs b/ui/packages/consul-ui/app/components/data-form/index.hbs index 14d1341314d..7e84ca781b7 100644 --- a/ui/packages/consul-ui/app/components/data-form/index.hbs +++ b/ui/packages/consul-ui/app/components/data-form/index.hbs @@ -18,7 +18,7 @@ @onchange={{action "setData"}} @once={{true}} > - + <:loaded> - + diff --git a/ui/packages/consul-ui/app/components/data-loader/index.hbs b/ui/packages/consul-ui/app/components/data-loader/index.hbs index d945817ffc2..cbcb4028e9c 100644 --- a/ui/packages/consul-ui/app/components/data-loader/index.hbs +++ b/ui/packages/consul-ui/app/components/data-loader/index.hbs @@ -16,8 +16,8 @@ dispatchError=(queue (action (mut this.error) value="error.errors.firstObject") (action dispatch "ERROR")) ) as |api|}} - {{#yield-slot name="data"}} - {{yield api}} + {{#if (has-block "data")}} + {{yield api to="data"}} {{else}} {{! if we didn't specify any data}} {{#if (not @items)}} @@ -36,30 +36,30 @@ {{/if}} {{/if}} - {{/yield-slot}} + {{/if}} - {{#yield-slot name="loading"}} - {{yield api}} + {{#if (has-block "loading")}} + {{yield api to="loading"}} {{else}} - {{/yield-slot}} + {{/if}} - {{#yield-slot name="error"}} - {{yield api}} + {{#if (has-block "error")}} + {{yield api to="error"}} {{else}} - {{/yield-slot}} + {{/if}} {{#if (not (eq this.error.status '401'))}} - {{#yield-slot name="disconnected" params=(block-params (action dispatch "RESET"))}} - {{yield api}} + {{#if (has-block "disconnected")}} + {{yield api (action dispatch "RESET") to="disconnected"}} {{else}} Warning! An error was returned whilst loading this data, refresh to try again. - {{/yield-slot}} + {{/if}} {{/if}} {{#if (eq this.error.status "403")}} - {{#yield-slot name="error"}} - {{yield api}} + {{#if (has-block "error")}} + {{yield api to="error"}} {{else}} - {{/yield-slot}} + {{/if}} {{else}} - - {{yield api}} - + {{yield api to="loaded"}} {{/if}} {{/let}} {{did-update-helper (fn dispatch "LOAD") src=@src}} - \ No newline at end of file + diff --git a/ui/packages/consul-ui/app/components/data-loader/index.js b/ui/packages/consul-ui/app/components/data-loader/index.js index 302fb03cc17..a03ba6700ff 100644 --- a/ui/packages/consul-ui/app/components/data-loader/index.js +++ b/ui/packages/consul-ui/app/components/data-loader/index.js @@ -5,10 +5,9 @@ import Component from '@ember/component'; import { set } from '@ember/object'; -import Slotted from 'block-slots'; import chart from './chart.xstate'; -export default Component.extend(Slotted, { +export default Component.extend( { tagName: '', onchange: (data) => data, init: function () { diff --git a/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/index.hbs b/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/index.hbs index 711555c84fe..942cdf69ebb 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/index.hbs @@ -14,10 +14,9 @@ as |route|> partition=route.params.partition nspace=route.params.nspace dc=route.params.dc - )}} - as |loader|> + )}}> - + <:error as |loader|> {{#if (eq loader.error.status '401')}} {{else}} @@ -26,9 +25,9 @@ as |route|> @login={{route.model.app.login.open}} /> {{/if}} - + - + <:loaded as |loader|> {{#let (hash @@ -132,6 +131,6 @@ as |route|> {{/let}} - + diff --git a/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show.hbs b/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show.hbs index 5606f369d1e..d6853e6af76 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show.hbs @@ -13,19 +13,17 @@ dc=route.params.dc name=route.params.id ) - }} - as |loader| - > + }}> - + <:error as |loader|> {{#if (eq loader.error.status '401')}} {{else}} {{/if}} - + - + <:loaded as |loader|> {{#let loader.data as |item|}} <:breadcrumbs> @@ -78,6 +76,6 @@ {{/let}} - + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show/binding-rules.hbs b/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show/binding-rules.hbs index 19271af94d9..aa3f8f2207d 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show/binding-rules.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show/binding-rules.hbs @@ -15,17 +15,17 @@ as |route|> dc=route.params.dc name=route.params.id ) - }} - as |loader|> + }}> + - + <:error as |loader|> - + - + <:loaded as |loader|> {{#let loader.data as |items|}} @@ -53,7 +53,7 @@ as |items|}} {{t 'routes.dc.acls.auth-methods.show.binding-rules.index.empty.body' htmlSafe=true - }} + }}>
  • -
    + diff --git a/ui/packages/consul-ui/app/components/consul/auth-method/view/index.hbs b/ui/packages/consul-ui/app/components/consul/auth-method/view/index.hbs index 533080da342..7b99bcedb59 100644 --- a/ui/packages/consul-ui/app/components/consul/auth-method/view/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/auth-method/view/index.hbs @@ -270,13 +270,13 @@ as |item|}}
    Actions
    {{else}} - + <:header>

    No claim mappings

    - - + + <:body>

    Use this if the claim you are capturing is singular. When mapped, the values can be any of a number, string, or boolean and will all be stringified when returned.

    -
    - + + <:actions> - + {{/if}} @@ -313,13 +313,13 @@ as |item|}} {{else}} - + <:header>

    No list claim mappings

    -
    - + + <:body>

    Use this if the claim you are capturing is list-like (such as groups). When mapped, the values can be any of a number, string, or boolean and will all be stringified when returned.

    -
    - + + <:actions> - +
    {{/if}} diff --git a/ui/packages/consul-ui/app/components/consul/intention/form/fieldsets/index.hbs b/ui/packages/consul-ui/app/components/consul/intention/form/fieldsets/index.hbs index b438ae6bf47..d8abd56f526 100644 --- a/ui/packages/consul-ui/app/components/consul/intention/form/fieldsets/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/intention/form/fieldsets/index.hbs @@ -235,17 +235,17 @@ /> {{else}} - + <:header>

    No permissions yet

    -
    - + + <:body>

    Permissions intercept an Intention's traffic using Layer 7 criteria, such as path prefixes and http headers.

    -
    - + + <:actions>
  • -
    +
    {{/if}}
    diff --git a/ui/packages/consul-ui/app/components/empty-state/index.hbs b/ui/packages/consul-ui/app/components/empty-state/index.hbs index 56836b9364b..50bad1ba7b1 100644 --- a/ui/packages/consul-ui/app/components/empty-state/index.hbs +++ b/ui/packages/consul-ui/app/components/empty-state/index.hbs @@ -3,42 +3,43 @@ SPDX-License-Identifier: BUSL-1.1 }} -{{yield}} -
    -{{#if this.hasHeader}} -
    - {{#yield-slot name="header"}} - {{yield}} - {{/yield-slot}} - {{#yield-slot name="subheader"}} - {{yield}} - {{/yield-slot}} -
    -{{/if}} - {{#yield-slot name="body"}} -
    - {{yield}} - {{#if @login}} - - - +
    + {{#if (or (has-block 'header') (has-block 'subheader'))}} +
    + {{#if (has-block 'header')}} + {{yield to='header'}} + {{else}} {{/if}} -
    - {{/yield-slot}} - {{#yield-slot name="actions"}} + {{#if (has-block 'subheader')}} + {{yield to='subheader'}} + {{else}} + {{/if}} + + {{/if}} +
    + {{#if (has-block 'body')}} + {{yield to='body'}} + {{/if}} + {{#if @login}} + + + + + + {{/if}} +
    + + {{#if (has-block 'actions')}}
      - {{yield}} + {{yield to='actions'}}
    - {{/yield-slot}} + {{/if}}
    \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/empty-state/index.js b/ui/packages/consul-ui/app/components/empty-state/index.js index 6976f497422..b9f3eb8f0e2 100644 --- a/ui/packages/consul-ui/app/components/empty-state/index.js +++ b/ui/packages/consul-ui/app/components/empty-state/index.js @@ -4,13 +4,7 @@ */ import Component from '@ember/component'; -import { set } from '@ember/object'; -import Slotted from 'block-slots'; -export default Component.extend(Slotted, { +export default Component.extend({ tagName: '', - willRender: function () { - this._super(...arguments); - set(this, 'hasHeader', this._isRegistered('header') || this._isRegistered('subheader')); - }, }); diff --git a/ui/packages/consul-ui/app/components/error-state/index.hbs b/ui/packages/consul-ui/app/components/error-state/index.hbs index de89e5e0a9b..0db5c6093e6 100644 --- a/ui/packages/consul-ui/app/components/error-state/index.hbs +++ b/ui/packages/consul-ui/app/components/error-state/index.hbs @@ -8,21 +8,19 @@ class={{concat "status-" @error.status}} @login={{@login}} > - + <:header>

    {{or @error.message "Consul returned an error"}}

    -
    -{{#if @error.status }} - -

    - Error {{@error.status}} -

    -
    -{{/if}} - + + <:subheader> + {{#if @error.status}} +

    + Error {{@error.status}} +

    + {{/if}} + + <:body>

    {{#if @error.detail}} {{@error.detail}} @@ -30,8 +28,8 @@ You may have visited a URL that is loading an unknown resource, so you can try going back to the root or try re-submitting your ACL Token/SecretID by going back to ACLs. {{/if}}

    -
    - + + <:actions>
  • -
    + {{else}} - -

    + <:header> +

    You are not authorized

    -
    - + + <:subheader>

    Error {{@error.status}}

    -
    - + + <:body>

    You must be granted permissions to view this data. Ask your administrator if you think you should have access.

    -
    - + + <:actions>
  • -
    +
    {{/if}} diff --git a/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/index.hbs b/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/index.hbs index 942cdf69ebb..643b6185521 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/index.hbs @@ -92,20 +92,20 @@ as |route|> - + <:header>

    {{t 'routes.dc.acls.auth-methods.index.empty.header' items=items.length }}

    -
    - + + <:body> {{t 'routes.dc.acls.auth-methods.index.empty.body' items=items.length htmlSafe=true }} - - + + <:actions>
  • @size='small' />
  • -
    +
    diff --git a/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show/binding-rules.hbs b/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show/binding-rules.hbs index aa3f8f2207d..12de2153b9b 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show/binding-rules.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show/binding-rules.hbs @@ -45,21 +45,21 @@ as |items|}} {{/each}} {{else}} - + <:header>

    {{t 'routes.dc.acls.auth-methods.show.binding-rules.index.empty.header'}}

    -
    - + + <:body> {{t 'routes.dc.acls.auth-methods.show.binding-rules.index.empty.body' htmlSafe=true }}> - - + + <:actions> - +
    {{/if}}
    diff --git a/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show/nspace-rules.hbs b/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show/nspace-rules.hbs index d069a55bcee..e7897f54a8e 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show/nspace-rules.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/auth-methods/show/nspace-rules.hbs @@ -17,21 +17,21 @@ as |item|}} {{else}} - + <:header>

    {{compute (fn route.t 'empty.header')}}

    -
    - + + <:body> {{compute (fn route.t 'empty.body' (hash htmlSafe=true ))}} - - + + <:actions> - +
    {{/if}} diff --git a/ui/packages/consul-ui/app/templates/dc/acls/policies/index.hbs b/ui/packages/consul-ui/app/templates/dc/acls/policies/index.hbs index d75aa57ce6b..640c3300410 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/policies/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/policies/index.hbs @@ -105,20 +105,20 @@ as |route|> - + <:header>

    {{t 'routes.dc.acls.policies.index.empty.header' items=items.length }}

    -
    - + + <:body> {{t 'routes.dc.acls.policies.index.empty.body' items=items.length htmlSafe=true }} - - + + <:actions>
  • @size='small' />
  • -
    +
    diff --git a/ui/packages/consul-ui/app/templates/dc/acls/roles/index.hbs b/ui/packages/consul-ui/app/templates/dc/acls/roles/index.hbs index 775ef11b6a3..1f7822db3fe 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/roles/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/roles/index.hbs @@ -97,20 +97,20 @@ as |route|> - + <:header>

    {{t 'routes.dc.acls.roles.index.empty.header' items=items.length }}

    -
    - + + <:body> {{t 'routes.dc.acls.roles.index.empty.body' items=items.length htmlSafe=true }} - - + + <:actions>
  • @size='small' />
  • -
    +
    diff --git a/ui/packages/consul-ui/app/templates/dc/acls/tokens/index.hbs b/ui/packages/consul-ui/app/templates/dc/acls/tokens/index.hbs index 12b44f82b94..7529bcd1500 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/tokens/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/tokens/index.hbs @@ -114,19 +114,19 @@ as |route|> - + <:header>

    {{t 'routes.dc.acls.tokens.index.empty.header' items=items.length }}

    -
    - + + <:body> {{t 'routes.dc.acls.tokens.index.empty.body' items=items.length htmlSafe=true }} - +
    diff --git a/ui/packages/consul-ui/app/templates/dc/intentions/index.hbs b/ui/packages/consul-ui/app/templates/dc/intentions/index.hbs index a8bd2b4e822..2fca27cf19a 100644 --- a/ui/packages/consul-ui/app/templates/dc/intentions/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/intentions/index.hbs @@ -113,21 +113,21 @@ as |route|> - + <:header>

    {{t 'routes.dc.intentions.index.empty.header' items=items.length }}

    -
    - + + <:body> {{t 'routes.dc.intentions.index.empty.body' items=items.length canUseACLs=(can "use acls") htmlSafe=true }} - - + + <:actions>
  • @size='small' />
  • -
    +
    diff --git a/ui/packages/consul-ui/app/templates/dc/kv/index.hbs b/ui/packages/consul-ui/app/templates/dc/kv/index.hbs index e683e3cffb0..42419641a20 100644 --- a/ui/packages/consul-ui/app/templates/dc/kv/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/kv/index.hbs @@ -168,21 +168,21 @@ as |sort filters parent items|}} - + <:header>

    {{t 'routes.dc.kv.index.empty.header' items=items.length }}

    -
    - + + <:body> {{t 'routes.dc.kv.index.empty.body' items=items.length canUseACLs=(can "use acls") htmlSafe=true }} - - + + <:actions>
  • -
    +
    diff --git a/ui/packages/consul-ui/app/templates/dc/nodes/index.hbs b/ui/packages/consul-ui/app/templates/dc/nodes/index.hbs index e0cc6c382eb..2ca432879a1 100644 --- a/ui/packages/consul-ui/app/templates/dc/nodes/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/nodes/index.hbs @@ -84,20 +84,20 @@ - + <:header>

    {{t 'routes.dc.nodes.index.empty.header' items=items.length}}

    -
    - + + <:body> {{t 'routes.dc.nodes.index.empty.body' items=items.length canUseACLs=(can 'use acls') htmlSafe=true }} - - + + <:actions>
  • -
    +
    diff --git a/ui/packages/consul-ui/app/templates/dc/nodes/show/healthchecks.hbs b/ui/packages/consul-ui/app/templates/dc/nodes/show/healthchecks.hbs index 4b4537a4719..3898a23a1dd 100644 --- a/ui/packages/consul-ui/app/templates/dc/nodes/show/healthchecks.hbs +++ b/ui/packages/consul-ui/app/templates/dc/nodes/show/healthchecks.hbs @@ -74,12 +74,12 @@ as |route|> - + <:body> {{t "routes.dc.nodes.show.healthchecks.empty" items=items.length htmlSafe=true }} - + diff --git a/ui/packages/consul-ui/app/templates/dc/nodes/show/metadata.hbs b/ui/packages/consul-ui/app/templates/dc/nodes/show/metadata.hbs index 06ebf4cb42f..fce99619b03 100644 --- a/ui/packages/consul-ui/app/templates/dc/nodes/show/metadata.hbs +++ b/ui/packages/consul-ui/app/templates/dc/nodes/show/metadata.hbs @@ -11,11 +11,11 @@ as |route|> {{else}} - + <:body>

    This node has no metadata.

    -
    +
    {{/if}} diff --git a/ui/packages/consul-ui/app/templates/dc/nodes/show/services.hbs b/ui/packages/consul-ui/app/templates/dc/nodes/show/services.hbs index e491fd67fa2..48629b635d5 100644 --- a/ui/packages/consul-ui/app/templates/dc/nodes/show/services.hbs +++ b/ui/packages/consul-ui/app/templates/dc/nodes/show/services.hbs @@ -69,12 +69,12 @@ as |route|> - + <:body> {{t "routes.dc.nodes.show.services.empty" items=items.length htmlSafe=true }} - + diff --git a/ui/packages/consul-ui/app/templates/dc/nodes/show/sessions.hbs b/ui/packages/consul-ui/app/templates/dc/nodes/show/sessions.hbs index dc406e79821..63dc83ceb43 100644 --- a/ui/packages/consul-ui/app/templates/dc/nodes/show/sessions.hbs +++ b/ui/packages/consul-ui/app/templates/dc/nodes/show/sessions.hbs @@ -74,21 +74,21 @@ as |route|> - + <:header>

    {{t 'routes.dc.nodes.show.sessions.empty.header' items=items.length }}

    -
    - + + <:body> {{t 'routes.dc.nodes.show.sessions.empty.body' canUseACLs=(can "use acls") htmlSafe=true }} - + - + <:actions>
  • @size='small' />
  • -
    +
    diff --git a/ui/packages/consul-ui/app/templates/dc/nspaces/index.hbs b/ui/packages/consul-ui/app/templates/dc/nspaces/index.hbs index 196df2f9a2c..3ee92fbc9f6 100644 --- a/ui/packages/consul-ui/app/templates/dc/nspaces/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/nspaces/index.hbs @@ -111,20 +111,20 @@ as |route|> - + <:header>

    {{t 'routes.dc.namespaces.index.empty.header' items=items.length}}

    -
    - + + <:body>

    {{t 'routes.dc.namespaces.index.empty.body' items=items.length canUseACLs=(can 'use acls')}}

    -
    - + + <:actions>
  • @size='small' />
  • -
    +
    diff --git a/ui/packages/consul-ui/app/templates/dc/partitions/index.hbs b/ui/packages/consul-ui/app/templates/dc/partitions/index.hbs index ade9e8ed213..960813fbca4 100644 --- a/ui/packages/consul-ui/app/templates/dc/partitions/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/partitions/index.hbs @@ -111,20 +111,20 @@ as |route|> - + <:header>

    {{t 'routes.dc.partitions.index.empty.header' items=items.length}}

    -
    - + + <:body>

    {{t 'routes.dc.partitions.index.empty.body' items=items.length canUseACLs=(can 'use acls')}}

    -
    - + + <:actions> - +
    diff --git a/ui/packages/consul-ui/app/templates/dc/peers/index.hbs b/ui/packages/consul-ui/app/templates/dc/peers/index.hbs index 52be89174da..e2aac0629fc 100644 --- a/ui/packages/consul-ui/app/templates/dc/peers/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/peers/index.hbs @@ -176,15 +176,15 @@ {{! TODO: do we need to check permissions here or will we receive an error automatically? }} - + <:header>

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

    -
    - + + <:body>

    {{t "routes.dc.peers.index.empty.body" @@ -194,8 +194,8 @@ htmlSafe=true }}

    -
    - + + <:actions>
  • {{! what's the docs for peering?}}
  • -
    +
    diff --git a/ui/packages/consul-ui/app/templates/dc/peers/show/addresses.hbs b/ui/packages/consul-ui/app/templates/dc/peers/show/addresses.hbs index fdd823c0f13..90e93027464 100644 --- a/ui/packages/consul-ui/app/templates/dc/peers/show/addresses.hbs +++ b/ui/packages/consul-ui/app/templates/dc/peers/show/addresses.hbs @@ -8,15 +8,15 @@ {{else}} - + <:header>

    {{t "routes.dc.peers.show.addresses.empty.header"}}

    -
    - + + <:body> {{t "routes.dc.peers.show.addresses.empty.body" htmlSafe=true}} - - + + <:actions>
  • -
    +
    {{/if}} \ No newline at end of file diff --git a/ui/packages/consul-ui/app/templates/dc/peers/show/exported.hbs b/ui/packages/consul-ui/app/templates/dc/peers/show/exported.hbs index db60f1c8228..5526d3d48f8 100644 --- a/ui/packages/consul-ui/app/templates/dc/peers/show/exported.hbs +++ b/ui/packages/consul-ui/app/templates/dc/peers/show/exported.hbs @@ -85,23 +85,23 @@ @login={{route.model.app.login.open}} data-test-exported-services-empty > - + <:header>

    {{t "routes.dc.peers.show.exported.empty.header" name=route.model.peer.Name }}

    -
    - + + <:body> {{t "routes.dc.peers.show.exported.empty.body" items=items.length name=route.model.peer.Name htmlSafe=true }} - - + + <:actions>
  • -
    + {{/if}} diff --git a/ui/packages/consul-ui/app/templates/dc/peers/show/imported.hbs b/ui/packages/consul-ui/app/templates/dc/peers/show/imported.hbs index a71e9e6d7a8..5ed16df01db 100644 --- a/ui/packages/consul-ui/app/templates/dc/peers/show/imported.hbs +++ b/ui/packages/consul-ui/app/templates/dc/peers/show/imported.hbs @@ -91,23 +91,23 @@ @login={{route.model.app.login.open}} data-test-imported-services-empty > - + <:header>

    {{t "routes.dc.peers.show.imported.empty.header" name=route.model.peer.Name }}

    -
    - + + <:body> {{t "routes.dc.peers.show.imported.empty.body" items=items.length name=route.model.peer.Name htmlSafe=true }} - - + + <:actions>
  • {{! what's the docs for peering?}}
  • -
    + diff --git a/ui/packages/consul-ui/app/templates/dc/services/index.hbs b/ui/packages/consul-ui/app/templates/dc/services/index.hbs index fc5d94a74ed..d738b93eecd 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/index.hbs @@ -109,21 +109,21 @@ as |sort filters items partition nspace|}} - + <:header>

    {{t 'routes.dc.services.index.empty.header' items=items.length }}

    -
    - + + <:body> {{t 'routes.dc.services.index.empty.body' items=items.length canUseACLs=(can "use acls") htmlSafe=true }} - - + + <:actions>
  • -
    +
    diff --git a/ui/packages/consul-ui/app/templates/dc/services/instance/exposedpaths.hbs b/ui/packages/consul-ui/app/templates/dc/services/instance/exposedpaths.hbs index 0442c6833d5..40e698a890c 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/instance/exposedpaths.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/instance/exposedpaths.hbs @@ -19,9 +19,9 @@ as |item proxy|}} /> {{else}} - + <:body> {{t 'routes.dc.services.instance.exposedpaths.empty.body' htmlSafe=true}} - + {{/if}} diff --git a/ui/packages/consul-ui/app/templates/dc/services/instance/healthchecks.hbs b/ui/packages/consul-ui/app/templates/dc/services/instance/healthchecks.hbs index adbb3794a87..ffd6aea847e 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/instance/healthchecks.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/instance/healthchecks.hbs @@ -72,13 +72,13 @@ - + <:body> {{t 'routes.dc.services.instance.healthchecks.empty' items=items.length htmlSafe=true }} - + diff --git a/ui/packages/consul-ui/app/templates/dc/services/instance/metadata.hbs b/ui/packages/consul-ui/app/templates/dc/services/instance/metadata.hbs index 5635d2bf97e..69bb0468087 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/instance/metadata.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/instance/metadata.hbs @@ -16,11 +16,11 @@ as |item|}} {{else}} - + <:body>

    There are no tags.

    -
    +
    {{/if}} @@ -30,11 +30,11 @@ as |item|}} {{else}} - + <:body>

    This instance has no metadata.

    -
    +
    {{/if}} diff --git a/ui/packages/consul-ui/app/templates/dc/services/instance/upstreams.hbs b/ui/packages/consul-ui/app/templates/dc/services/instance/upstreams.hbs index 2a49fa17ac7..138324c5472 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/instance/upstreams.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/instance/upstreams.hbs @@ -80,12 +80,12 @@ as |route|> - + <:body> {{t "routes.dc.services.instance.upstreams.empty" items=items.length htmlSafe=true }} - + diff --git a/ui/packages/consul-ui/app/templates/dc/services/show/instances.hbs b/ui/packages/consul-ui/app/templates/dc/services/show/instances.hbs index e782e37c680..a8401cf48bd 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show/instances.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show/instances.hbs @@ -81,12 +81,12 @@ as |sort filters items proxyMeta|}} - + <:body> {{t "routes.dc.services.show.instances.empty" items=items.length htmlSafe=true }} - + diff --git a/ui/packages/consul-ui/app/templates/dc/services/show/intentions/index.hbs b/ui/packages/consul-ui/app/templates/dc/services/show/intentions/index.hbs index cce98c88459..bf38f4b42e9 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show/intentions/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show/intentions/index.hbs @@ -100,21 +100,21 @@ as |route|> - + <:header>

    {{t 'routes.dc.services.show.intentions.index.empty.header' items=items.length }}

    -
    - + + <:body> {{t 'routes.dc.services.show.intentions.index.empty.body' items=items.length canUseACLs=(can 'use acls') htmlSafe=true }} - - + + <:actions>
  • @size='small' />
  • -
    +
    diff --git a/ui/packages/consul-ui/app/templates/dc/services/show/services.hbs b/ui/packages/consul-ui/app/templates/dc/services/show/services.hbs index 59c54160e0c..8aa44b8f3a0 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show/services.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show/services.hbs @@ -81,12 +81,12 @@ as |route|> - + <:body> {{t "routes.dc.services.show.services.empty" items=items.length htmlSafe=true }} - + diff --git a/ui/packages/consul-ui/app/templates/dc/services/show/tags.hbs b/ui/packages/consul-ui/app/templates/dc/services/show/tags.hbs index adb0916be85..78fbe120225 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show/tags.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show/tags.hbs @@ -12,16 +12,16 @@ as |route|> {{else}} - + <:header>

    {{t 'routes.dc.services.show.tags.empty.header'}}

    -
    - + + <:body> {{t 'routes.dc.services.show.tags.empty.body' htmlSafe=true }} - +
    {{/if}} {{/let}} diff --git a/ui/packages/consul-ui/app/templates/dc/services/show/upstreams.hbs b/ui/packages/consul-ui/app/templates/dc/services/show/upstreams.hbs index 191aad4c1bd..4c390b98de1 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show/upstreams.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show/upstreams.hbs @@ -86,12 +86,12 @@ as |route|> - + <:body> {{t "routes.dc.services.show.upstreams.empty" items=items.length htmlSafe=true }} - + From 3b0b4ca5c92127d37baecfd67243fd7672157c7b Mon Sep 17 00:00:00 2001 From: Suresh Dunga Date: Sat, 18 Apr 2026 23:35:11 +0530 Subject: [PATCH 09/34] replaces slotted in ChildSelector component --- .../app/components/child-selector/index.hbs | 6 +++--- .../app/components/child-selector/index.js | 4 +--- .../app/components/policy-selector/index.hbs | 20 +++++++++---------- .../app/components/role-selector/index.hbs | 16 +++++++-------- 4 files changed, 22 insertions(+), 24 deletions(-) diff --git a/ui/packages/consul-ui/app/components/child-selector/index.hbs b/ui/packages/consul-ui/app/components/child-selector/index.hbs index ac492ee8898..5cfe1ac4b04 100644 --- a/ui/packages/consul-ui/app/components/child-selector/index.hbs +++ b/ui/packages/consul-ui/app/components/child-selector/index.hbs @@ -10,9 +10,9 @@ > {{yield}} {{#if (not @disabled)}} - {{yield}} + {{yield to="create"}}
    - + + <:option as |option|> {{option.Name}} - - + + <:set as |remove|> - + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/role-selector/index.hbs b/ui/packages/consul-ui/app/components/role-selector/index.hbs index a7a52c95243..c3accd88715 100644 --- a/ui/packages/consul-ui/app/components/role-selector/index.hbs +++ b/ui/packages/consul-ui/app/components/role-selector/index.hbs @@ -114,10 +114,10 @@ as |modal|> @placeholder="Search for role" @items={{@items}} > - + <:label> Apply an existing role - - + + <:create> data-test-role-create {{on "click" (optional this.modal.open)}} /> - - + + <:option as |option|> {{option.Name}} - - + + <:set as |remove|> - + From b1b7fb100e5fdc8b633ef59640ed33f26dbb6309 Mon Sep 17 00:00:00 2001 From: Suresh Dunga Date: Sun, 19 Apr 2026 11:43:23 +0530 Subject: [PATCH 10/34] remove debug comments --- ui/packages/consul-ui/app/components/data-writer/index.hbs | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui/packages/consul-ui/app/components/data-writer/index.hbs b/ui/packages/consul-ui/app/components/data-writer/index.hbs index 0c969fc4bce..6f22eabfdf1 100644 --- a/ui/packages/consul-ui/app/components/data-writer/index.hbs +++ b/ui/packages/consul-ui/app/components/data-writer/index.hbs @@ -101,10 +101,8 @@ as |after|}} {{#if (has-block "content")}} - {{log 'hello content with block'}} {{yield api to="content"}} {{else}} - {{log 'hello content without block'}} {{yield api}} {{/if}} From f47bd3520b3a8723d1dac422d126796bd3d0bd59 Mon Sep 17 00:00:00 2001 From: Suresh Dunga Date: Sun, 19 Apr 2026 14:03:29 +0530 Subject: [PATCH 11/34] removes slotted for confirmation-alert --- .../components/confirmation-alert/index.hbs | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/ui/packages/consul-ui/app/components/confirmation-alert/index.hbs b/ui/packages/consul-ui/app/components/confirmation-alert/index.hbs index 95f243a8923..651b6d5ab15 100644 --- a/ui/packages/consul-ui/app/components/confirmation-alert/index.hbs +++ b/ui/packages/consul-ui/app/components/confirmation-alert/index.hbs @@ -3,28 +3,37 @@ SPDX-License-Identifier: BUSL-1.1 }} -{{yield}} <:header> - {{yield}} + {{#if (has-block "header")}} + {{yield to="header"}} + {{else}} + {{yield}} + {{/if}} <:body> - {{yield}} + {{#if (has-block "body")}} + {{yield to="body"}} + {{else}} + {{yield}} + {{/if}} <:actions as |Actions|> - + {{else}} {{yield}} - + {{/if}} @@ -32,4 +41,4 @@ - \ No newline at end of file + From 35a223c13d12ab9d3829f10cd3d5c1ea01587780 Mon Sep 17 00:00:00 2001 From: Suresh Dunga Date: Sun, 19 Apr 2026 14:04:02 +0530 Subject: [PATCH 12/34] chore: migrate confirmation-dialog from YieldSlot to Named Blocks --- .../components/confirmation-dialog/index.hbs | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/ui/packages/consul-ui/app/components/confirmation-dialog/index.hbs b/ui/packages/consul-ui/app/components/confirmation-dialog/index.hbs index 812c7b337ae..056611f467d 100644 --- a/ui/packages/consul-ui/app/components/confirmation-dialog/index.hbs +++ b/ui/packages/consul-ui/app/components/confirmation-dialog/index.hbs @@ -4,15 +4,19 @@ }}
    -{{yield}} - -{{#if (or this.permanent (not this.confirming))}} + {{#if (has-block)}} {{yield}} -{{/if}} - - -{{#if this.confirming }} - {{yield}} -{{/if}} - -
    \ No newline at end of file + {{/if}} + + {{#if (has-block "action")}} + {{#if (or this.permanent (not this.confirming))}} + {{yield (action "confirm") (action "cancel") to="action"}} + {{/if}} + {{/if}} + + {{#if (has-block "dialog")}} + {{#if this.confirming}} + {{yield (action "execute") (action "cancel") @message this.actionName to="dialog"}} + {{/if}} + {{/if}} + From e795020bba9965e54a047136db4bbeb7c746c235 Mon Sep 17 00:00:00 2001 From: Suresh Dunga Date: Sun, 19 Apr 2026 14:04:23 +0530 Subject: [PATCH 13/34] chore: remove Slotted mixin from confirmation-dialog --- .../consul-ui/app/components/confirmation-dialog/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/packages/consul-ui/app/components/confirmation-dialog/index.js b/ui/packages/consul-ui/app/components/confirmation-dialog/index.js index 69b9b75af94..9d36a4402db 100644 --- a/ui/packages/consul-ui/app/components/confirmation-dialog/index.js +++ b/ui/packages/consul-ui/app/components/confirmation-dialog/index.js @@ -7,9 +7,8 @@ import Component from '@ember/component'; import { action } from '@ember/object'; import { tracked } from '@glimmer/tracking'; -import Slotted from 'block-slots'; -export default class ConfirmationDialogComponent extends Component.extend(Slotted) { +export default class ConfirmationDialogComponent extends Component { tagName = ''; message = 'Are you sure?'; @tracked confirming = false; From f8996a700ce022e90331a466fca9fbbd5cf73bf9 Mon Sep 17 00:00:00 2001 From: Suresh Dunga Date: Sun, 19 Apr 2026 14:17:02 +0530 Subject: [PATCH 14/34] replaces slotted for confirmation-dialog --- .../app/components/consul/intention/form/index.hbs | 8 ++++---- .../consul-ui/app/components/consul/kv/form/index.hbs | 8 ++++---- .../app/components/consul/lock-session/form/index.hbs | 8 ++++---- .../app/components/consul/lock-session/list/index.hbs | 8 ++++---- .../consul-ui/app/components/consul/nspace/form/index.hbs | 8 ++++---- .../app/components/consul/partition/form/index.hbs | 8 ++++---- .../consul-ui/app/components/consul/policy/form/index.hbs | 8 ++++---- .../consul-ui/app/components/consul/role/form/index.hbs | 8 ++++---- .../consul-ui/app/components/consul/token/form/index.hbs | 8 ++++---- .../consul-ui/app/components/policy-selector/index.hbs | 8 ++++---- .../consul-ui/app/templates/dc/acls/tokens/edit.hbs | 8 ++++---- 11 files changed, 44 insertions(+), 44 deletions(-) diff --git a/ui/packages/consul-ui/app/components/consul/intention/form/index.hbs b/ui/packages/consul-ui/app/components/consul/intention/form/index.hbs index 2993e0716fe..8c8a39d4507 100644 --- a/ui/packages/consul-ui/app/components/consul/intention/form/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/intention/form/index.hbs @@ -173,7 +173,7 @@ as |item readonly|}} {{#if (not api.isCreate)}} {{#if (not-eq item.ID 'anonymous') }} - + <:action as |confirm|> - - + + <:dialog as |execute cancel message|> - + {{/if}} {{/if}} diff --git a/ui/packages/consul-ui/app/components/consul/kv/form/index.hbs b/ui/packages/consul-ui/app/components/consul/kv/form/index.hbs index 70c5860a7a4..8df91778000 100644 --- a/ui/packages/consul-ui/app/components/consul/kv/form/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/kv/form/index.hbs @@ -120,7 +120,7 @@ /> {{#if (not disabld)}} - + <:action as |confirm|> - - + + <:dialog as |execute cancel message|> - + {{/if}} {{/if}} diff --git a/ui/packages/consul-ui/app/components/consul/lock-session/form/index.hbs b/ui/packages/consul-ui/app/components/consul/lock-session/form/index.hbs index b05c6341a06..8fb254dee1e 100644 --- a/ui/packages/consul-ui/app/components/consul/lock-session/form/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/lock-session/form/index.hbs @@ -80,15 +80,15 @@ {{#if (can 'delete session' item=@item)}} - + <:action as |confirm|> - - + + <:dialog as |execute cancel message|>

    {{message}}

    @@ -105,7 +105,7 @@ {{on 'click' cancel}} /> -
    +
    {{/if}} diff --git a/ui/packages/consul-ui/app/components/consul/lock-session/list/index.hbs b/ui/packages/consul-ui/app/components/consul/lock-session/list/index.hbs index d7cf99daff6..4822834d25d 100644 --- a/ui/packages/consul-ui/app/components/consul/lock-session/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/lock-session/list/index.hbs @@ -84,15 +84,15 @@ - + <:action as |confirm|> - - + + <:dialog as |execute cancel message|>

    {{message}}

    @@ -109,7 +109,7 @@ {{on 'click' cancel}} /> -
    +
    \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/nspace/form/index.hbs b/ui/packages/consul-ui/app/components/consul/nspace/form/index.hbs index 9abee4b143c..22d51f2a00f 100644 --- a/ui/packages/consul-ui/app/components/consul/nspace/form/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/nspace/form/index.hbs @@ -139,21 +139,21 @@ - + <:action as |confirm|> - - + + <:dialog as |execute cancel message|> - + {{/if}} diff --git a/ui/packages/consul-ui/app/components/consul/partition/form/index.hbs b/ui/packages/consul-ui/app/components/consul/partition/form/index.hbs index 096fa92cd33..20cc0bbb736 100644 --- a/ui/packages/consul-ui/app/components/consul/partition/form/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/partition/form/index.hbs @@ -112,21 +112,21 @@ as |State Guard ChartAction dispatch state|> {{#if (and (not (is "new partition" item=item)) (can "delete partition" item=item))}} - + <:action as |confirm|> - - + + <:dialog as |execute cancel message|> - + {{/if}} diff --git a/ui/packages/consul-ui/app/components/consul/policy/form/index.hbs b/ui/packages/consul-ui/app/components/consul/policy/form/index.hbs index 20653366f2e..9a19f510d56 100644 --- a/ui/packages/consul-ui/app/components/consul/policy/form/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/policy/form/index.hbs @@ -60,15 +60,15 @@ /> {{# if (and (not @create) (can "delete policy" item=@item) ) }} - + <:action as |confirm|> - - + + <:dialog as |execute cancel message|> {{#if (gt @items.length 0)}} {{/if}} - + {{/if}} diff --git a/ui/packages/consul-ui/app/components/consul/role/form/index.hbs b/ui/packages/consul-ui/app/components/consul/role/form/index.hbs index a06e8624925..a9d75957426 100644 --- a/ui/packages/consul-ui/app/components/consul/role/form/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/role/form/index.hbs @@ -60,15 +60,15 @@ {{# if (and (not @create) (can "delete role" item=@item) ) }} - + <:action as |confirm|> - - + + <:dialog as |execute cancel message|> {{#if (gt @items.length 0)}} {{/if}} - + {{/if}} diff --git a/ui/packages/consul-ui/app/components/consul/token/form/index.hbs b/ui/packages/consul-ui/app/components/consul/token/form/index.hbs index f816a086262..1dc9033de4f 100644 --- a/ui/packages/consul-ui/app/components/consul/token/form/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/token/form/index.hbs @@ -53,17 +53,17 @@ {{# if (and (not @create) (can "delete token" item=@item token=@token) ) }} - + <:action as |confirm|> - - + + <:dialog as |execute cancel message|> - + {{/if}} diff --git a/ui/packages/consul-ui/app/components/policy-selector/index.hbs b/ui/packages/consul-ui/app/components/policy-selector/index.hbs index d28ccfaea50..3dd0bdca76c 100644 --- a/ui/packages/consul-ui/app/components/policy-selector/index.hbs +++ b/ui/packages/consul-ui/app/components/policy-selector/index.hbs @@ -183,7 +183,7 @@ - + <:action as |confirm|> - - + + <:dialog as |execute cancel message|>

    {{message}}

    @@ -212,7 +212,7 @@ data-test-delete /> -
    +
    {{/if}} diff --git a/ui/packages/consul-ui/app/templates/dc/acls/tokens/edit.hbs b/ui/packages/consul-ui/app/templates/dc/acls/tokens/edit.hbs index 3f10a97a6c7..fd5f1cee72e 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/tokens/edit.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/tokens/edit.hbs @@ -59,15 +59,15 @@ as |dc partition nspace item create|}} {{#if (not-eq item.AccessorID this.token.AccessorID)}} - + <:action as |confirm|> - - + + <:dialog as |execute cancel message|>

    {{message}}

    @@ -84,7 +84,7 @@ as |dc partition nspace item create|}} {{action cancel}} />
    - + {{/if}} {{#if (can "duplicate token" item=item)}} From c1cb77b173700f5122ff34e722679262bda1b3fb Mon Sep 17 00:00:00 2001 From: Suresh Dunga Date: Tue, 21 Apr 2026 10:20:23 +0530 Subject: [PATCH 15/34] replace Slots for modal component --- .../app/components/child-selector/index.js | 7 +- .../consul/intention/form/fieldsets/index.hbs | 24 +++--- .../consul/intention/form/index.hbs | 18 +++-- .../components/consul/policy/form/index.hbs | 12 +-- .../app/components/consul/role/form/index.hbs | 12 +-- .../consul/token/selector/index.hbs | 38 +++++----- .../app/components/modal-dialog/index.hbs | 75 ++++++++----------- .../app/components/modal-dialog/index.js | 3 +- .../app/components/policy-selector/index.hbs | 17 +++-- .../app/components/role-selector/index.hbs | 18 +++-- .../topology-metrics/series/index.hbs | 20 ++--- .../app/templates/dc/peers/index.hbs | 32 ++++---- 12 files changed, 136 insertions(+), 140 deletions(-) diff --git a/ui/packages/consul-ui/app/components/child-selector/index.js b/ui/packages/consul-ui/app/components/child-selector/index.js index 5859b1d972c..b2104e298d6 100644 --- a/ui/packages/consul-ui/app/components/child-selector/index.js +++ b/ui/packages/consul-ui/app/components/child-selector/index.js @@ -28,8 +28,11 @@ export default Component.extend({ init: function () { this._super(...arguments); this._listeners = this.dom.listeners(); - set(this, 'form', this.formContainer.form(this.type)); - this.form.clear({ Datacenter: this.dc, Namespace: this.nspace }); + const form = this.formContainer.form(this.type) + setTimeout(() => { + form.clear({ Datacenter: this.dc, Namespace: this.nspace }); + }, 0) + set(this, 'form', form); }, willDestroyElement: function () { this._super(...arguments); diff --git a/ui/packages/consul-ui/app/components/consul/intention/form/fieldsets/index.hbs b/ui/packages/consul-ui/app/components/consul/intention/form/fieldsets/index.hbs index d8abd56f526..55e2ab72721 100644 --- a/ui/packages/consul-ui/app/components/consul/intention/form/fieldsets/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/intention/form/fieldsets/index.hbs @@ -33,7 +33,7 @@ {{service.Name}} {{/if}} - + {{#if @create}} Search for an existing service, or enter any Service name. {{/if}} @@ -276,35 +276,37 @@ @aria={{hash label="Edit Permission" }} - as |modal|> - - + > + <:default as |modal|> + + + <:header>

    Edit Permission

    -
    - + + <:body> - - + + <:actions as |close|> - + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/intention/form/index.hbs b/ui/packages/consul-ui/app/components/consul/intention/form/index.hbs index 8c8a39d4507..2d61d4dddae 100644 --- a/ui/packages/consul-ui/app/components/consul/intention/form/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/intention/form/index.hbs @@ -64,17 +64,19 @@ as |item readonly|}} @aria={{hash label=(concat "Set intention to " newAction) }} - as |modal|> - - + > + <:default as |modal|> + + + <:header>

    Set intention to {{newAction}}?

    -
    - + + <:body>

    When you change this Intention to {{newAction}}, you will remove all the Layer 7 policy permissions currently saved to this Intention. Are you sure you want to set it to {{newAction}}?

    -
    - + + <:actions as |close|> - + {{/let}} diff --git a/ui/packages/consul-ui/app/components/consul/policy/form/index.hbs b/ui/packages/consul-ui/app/components/consul/policy/form/index.hbs index 9a19f510d56..f3c534cb03b 100644 --- a/ui/packages/consul-ui/app/components/consul/policy/form/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/policy/form/index.hbs @@ -78,10 +78,10 @@ label="Policy in Use" }} > - + <:header>

    Policy in Use

    -
    - + + <:body>

    This Policy is currently in use. If you choose to delete this Policy, it will be removed from the following {{@items.length}} Tokens: @@ -90,8 +90,8 @@

    This action cannot be undone. {{message}}

    -
    - + + <:actions as |close|> - + {{else}} diff --git a/ui/packages/consul-ui/app/components/consul/role/form/index.hbs b/ui/packages/consul-ui/app/components/consul/role/form/index.hbs index a9d75957426..42290bd87eb 100644 --- a/ui/packages/consul-ui/app/components/consul/role/form/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/role/form/index.hbs @@ -76,10 +76,10 @@ label="Role in Use" }} > - + <:header>

    Role in Use

    -
    - + + <:body>

    This Role is currently in use. If you choose to delete this Role, it will be removed from the following {{@items.length}} Tokens: @@ -88,8 +88,8 @@

    This action cannot be undone. {{message}}

    -
    - + + <:actions as |close|> - + {{else}} diff --git a/ui/packages/consul-ui/app/components/consul/token/selector/index.hbs b/ui/packages/consul-ui/app/components/consul/token/selector/index.hbs index 89485ce0cff..8188c66914a 100644 --- a/ui/packages/consul-ui/app/components/consul/token/selector/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/token/selector/index.hbs @@ -16,15 +16,16 @@ @onclose={{this.close}} @onopen={{this.open}} @aria={{hash label="Log in to Consul"}} - as |modal| > - - + <:default as |modal|> + + + <:header>

    Log in to Consul

    -
    - + + <:body> {{/if}} - - + + <:actions as |close|> - + - - + <:default as |modal|> + + + <:header>

    Log in with a different token

    -
    - + + <:body> - - + + <:actions as |close|> - + - {{yield}} +{{#let (hash labelledby=(dom-guid)) as |aria|}} + {{#let (hash open=(action 'open') close=(action 'close') opened=this.isOpen aria=aria) as |api|}} + + {{yield api}}
    diff --git a/ui/packages/consul-ui/app/components/consul/kind/index.hbs b/ui/packages/consul-ui/app/components/consul/kind/index.hbs index 0c6e17309a3..811bb935e8d 100644 --- a/ui/packages/consul-ui/app/components/consul/kind/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/kind/index.hbs @@ -18,7 +18,7 @@
    - + <:header> {{#if (eq @item.Kind 'ingress-gateway')}} Ingress gateways enable ingress traffic from services outside the Consul service mesh to services inside the Consul service mesh. {{else if (eq @item.Kind 'terminating-gateway')}} @@ -28,8 +28,8 @@ {{else}} Mesh gateways enable routing of Connect traffic between different Consul datacenters. {{/if}} - - + + <:menu>
  • {{#if (eq @item.Kind 'ingress-gateway')}} About Ingress gateways @@ -97,7 +97,7 @@
  • {{/if}} {{/let}} -
    +
    diff --git a/ui/packages/consul-ui/app/components/consul/source/index.hbs b/ui/packages/consul-ui/app/components/consul/source/index.hbs index 43cf2265713..d43959f30f1 100644 --- a/ui/packages/consul-ui/app/components/consul/source/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/source/index.hbs @@ -16,10 +16,10 @@
    - + <:header> {{t "components.consul.source.header"}} - - + + <:menu>
  • {{t "components.consul.source.menu-title"}}
  • @@ -28,7 +28,7 @@ {{t "components.consul.source.links.documentation"}} -
    +
    diff --git a/ui/packages/consul-ui/app/components/menu-panel/index.hbs b/ui/packages/consul-ui/app/components/menu-panel/index.hbs index 503c5d46f1b..8502ad228c1 100644 --- a/ui/packages/consul-ui/app/components/menu-panel/index.hbs +++ b/ui/packages/consul-ui/app/components/menu-panel/index.hbs @@ -16,19 +16,24 @@ }} {{did-insert (action 'connect')}} > - + {{#if (has-block "controls")}} + {{yield api to="controls"}} + {{else}} {{yield api}} - - {{#yield-slot name="header"}} + {{/if}} + + {{#if (has-block "header")}}
    - {{yield api}} + {{yield api to="header"}}
    - {{else}} - {{/yield-slot}} + {{/if}} +
      - + {{#if (has-block "menu")}} + {{yield api to="menu"}} + {{else}} {{yield api}} - + {{/if}}
    -{{/let}} \ No newline at end of file +{{/let}} diff --git a/ui/packages/consul-ui/app/components/menu-panel/index.js b/ui/packages/consul-ui/app/components/menu-panel/index.js index b979b1f4240..ab9083009c2 100644 --- a/ui/packages/consul-ui/app/components/menu-panel/index.js +++ b/ui/packages/consul-ui/app/components/menu-panel/index.js @@ -8,9 +8,8 @@ import { inject as service } from '@ember/service'; import { next } from '@ember/runloop'; import { set } from '@ember/object'; -import Slotted from 'block-slots'; -export default Component.extend(Slotted, { +export default Component.extend({ tagName: '', dom: service('dom'), isConfirmation: false, diff --git a/ui/packages/consul-ui/app/components/popover-menu/index.hbs b/ui/packages/consul-ui/app/components/popover-menu/index.hbs index b7ccd11b85f..3bba80f964b 100644 --- a/ui/packages/consul-ui/app/components/popover-menu/index.hbs +++ b/ui/packages/consul-ui/app/components/popover-menu/index.hbs @@ -43,25 +43,24 @@ as |api|}} - - - + + + <:controls as |menu|> + {{#each this.submenus as |sub|}} {{/each}} - - {{#if this.hasHeader}} - + + <:header> {{yield components api}} {{#yield-slot name="header"}}{{else}}{{/yield-slot}} - - {{/if}} - + + <:menu> {{yield components api}} - + {{/let}} diff --git a/ui/packages/consul-ui/app/components/popover-menu/index.js b/ui/packages/consul-ui/app/components/popover-menu/index.js index 57358f361b5..ceb5e34ada8 100644 --- a/ui/packages/consul-ui/app/components/popover-menu/index.js +++ b/ui/packages/consul-ui/app/components/popover-menu/index.js @@ -23,10 +23,6 @@ export default Component.extend(Slotted, { this.guid = this.dom.guid(this); this.submenus = []; }, - willRender: function () { - this._super(...arguments); - set(this, 'hasHeader', this._isRegistered('header')); - }, actions: { addSubmenu: function (name) { set(this, 'submenus', this.submenus.concat(name)); From b9c96d472cc3257dea268c871b43ff1aaae737b8 Mon Sep 17 00:00:00 2001 From: Suresh Dunga Date: Tue, 21 Apr 2026 14:02:01 +0530 Subject: [PATCH 17/34] replaces slots for MenuSeparator --- .../app/components/popover-menu/menu-separator/index.hbs | 7 +++++-- .../app/components/popover-menu/menu-separator/index.js | 3 +-- .../app/components/popover-select/optgroup/index.hbs | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ui/packages/consul-ui/app/components/popover-menu/menu-separator/index.hbs b/ui/packages/consul-ui/app/components/popover-menu/menu-separator/index.hbs index 6d3012119d8..d99a27d0a22 100644 --- a/ui/packages/consul-ui/app/components/popover-menu/menu-separator/index.hbs +++ b/ui/packages/consul-ui/app/components/popover-menu/menu-separator/index.hbs @@ -3,7 +3,10 @@ SPDX-License-Identifier: BUSL-1.1 }} {{!-- template-lint-disable require-presentational-children --}} -{{yield}}
  • - {{yield}} + {{#if (has-block "label")}} + {{yield to="label"}} + {{else}} + {{yield}} + {{/if}}
  • diff --git a/ui/packages/consul-ui/app/components/popover-menu/menu-separator/index.js b/ui/packages/consul-ui/app/components/popover-menu/menu-separator/index.js index c93303764fa..fb3d263a1d9 100644 --- a/ui/packages/consul-ui/app/components/popover-menu/menu-separator/index.js +++ b/ui/packages/consul-ui/app/components/popover-menu/menu-separator/index.js @@ -5,8 +5,7 @@ import Component from '@ember/component'; -import Slotted from 'block-slots'; -export default Component.extend(Slotted, { +export default Component.extend({ tagName: '', }); diff --git a/ui/packages/consul-ui/app/components/popover-select/optgroup/index.hbs b/ui/packages/consul-ui/app/components/popover-select/optgroup/index.hbs index 772294c9fa9..a7cb55499c9 100644 --- a/ui/packages/consul-ui/app/components/popover-select/optgroup/index.hbs +++ b/ui/packages/consul-ui/app/components/popover-select/optgroup/index.hbs @@ -5,9 +5,9 @@ {{#let @components.MenuSeparator as |MenuSeparator|}} - + <:label> {{@label}} - + {{yield}} -{{/let}} \ No newline at end of file +{{/let}} From 09bd2508ec80ae2e77da3c348efb8baee3e587cf Mon Sep 17 00:00:00 2001 From: Suresh Dunga Date: Tue, 21 Apr 2026 14:46:58 +0530 Subject: [PATCH 18/34] replaces slots for MenuItem --- .../consul/intention/list/table/index.hbs | 20 +++---- .../app/components/consul/kv/list/index.hbs | 24 ++++---- .../components/consul/nspace/list/index.hbs | 20 +++---- .../consul/partition/list/index.hbs | 20 +++---- .../app/components/consul/peer/list/index.hbs | 24 ++++---- .../components/consul/policy/list/index.hbs | 20 +++---- .../app/components/consul/role/list/index.hbs | 20 +++---- .../components/consul/token/list/index.hbs | 56 +++++++++---------- .../popover-menu/menu-item/index.hbs | 47 ++++++++++------ .../popover-menu/menu-item/index.js | 8 +-- .../popover-select/option/index.hbs | 4 +- .../app/components/role-selector/index.hbs | 20 +++---- 12 files changed, 144 insertions(+), 139 deletions(-) diff --git a/ui/packages/consul-ui/app/components/consul/intention/list/table/index.hbs b/ui/packages/consul-ui/app/components/consul/intention/list/table/index.hbs index 8782a84a193..7d8588473b1 100644 --- a/ui/packages/consul-ui/app/components/consul/intention/list/table/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/intention/list/table/index.hbs @@ -94,23 +94,23 @@ {{#if (can 'write intention' item=item)}} - + <:label> Edit - + - + <:label> Delete - - + + <:confirmHeader> Confirm Delete - - + + <:confirmBody> Are you sure you want to delete this intention? - - + + <:confirmFooter as |Params|> - + {{else if (can 'view CRD intention' item=item)}} diff --git a/ui/packages/consul-ui/app/components/consul/kv/list/index.hbs b/ui/packages/consul-ui/app/components/consul/kv/list/index.hbs index 83e25f6ab11..c75be1cc18b 100644 --- a/ui/packages/consul-ui/app/components/consul/kv/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/kv/list/index.hbs @@ -31,34 +31,34 @@ data-test-edit @href={{href-to (if item.isFolder 'dc.kv.folder' 'dc.kv.edit') item.Key}} > - + <:label> {{if item.isFolder 'View' 'Edit'}} - + - + <:label> Delete - - + + <:confirmHeader> Confirm Delete - - + + <:confirmBody>

    Are you sure you want to delete this KV entry?

    -
    - + + <:confirmFooter as |Params|> - +
    {{else}} - + <:label> View - + {{/if}}
    diff --git a/ui/packages/consul-ui/app/components/consul/nspace/list/index.hbs b/ui/packages/consul-ui/app/components/consul/nspace/list/index.hbs index ba7d2b54a21..5d2ce512534 100644 --- a/ui/packages/consul-ui/app/components/consul/nspace/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/nspace/list/index.hbs @@ -42,13 +42,13 @@ data-test-edit-action @href={{href-to "dc.nspaces.edit" item.Name}} > - + <:label> {{#if (can "write nspace" item=item)}} Edit {{else}} View {{/if}} - + {{#if (can "delete nspace" item=item)}} - + <:label> Delete - - + + <:confirmHeader> Confirm delete - - + + <:confirmBody>

    Are you sure you want to delete this namespace?

    -
    - + + <:confirmFooter as |Params|> - +
    {{/if}} diff --git a/ui/packages/consul-ui/app/components/consul/partition/list/index.hbs b/ui/packages/consul-ui/app/components/consul/partition/list/index.hbs index cded3205e15..d46ca42f0c0 100644 --- a/ui/packages/consul-ui/app/components/consul/partition/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/partition/list/index.hbs @@ -31,30 +31,30 @@ {{#if (not item.DeletedAt)}} - + <:label> {{#if (can "write partition" item=item)}} Edit {{else}} View {{/if}} - + {{#if (can "delete partition" item=item)}} - + <:label> Delete - - + + <:confirmHeader> Confirm delete - - + + <:confirmBody>

    Are you sure you want to delete this partition?

    -
    - + + <:confirmFooter as |Params|> - +
    {{/if}}
    diff --git a/ui/packages/consul-ui/app/components/consul/peer/list/index.hbs b/ui/packages/consul-ui/app/components/consul/peer/list/index.hbs index a631b439087..3d65070c2d5 100644 --- a/ui/packages/consul-ui/app/components/consul/peer/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/peer/list/index.hbs @@ -59,38 +59,38 @@ {{#if (and (can "write peer" item=item) item.isDialer)}} - + <:label> Regenerate token - + {{/if}} - + <:label> View - + - + <:label> Delete - - + + <:confirmHeader> Confirm delete - - + + <:confirmBody>

    Are you sure you want to delete this peer?

    -
    - + + <:confirmFooter as |Params|> - +
    {{/if}} diff --git a/ui/packages/consul-ui/app/components/consul/policy/list/index.hbs b/ui/packages/consul-ui/app/components/consul/policy/list/index.hbs index 85bf83fe99f..c43368905f3 100644 --- a/ui/packages/consul-ui/app/components/consul/policy/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/policy/list/index.hbs @@ -42,30 +42,30 @@ <:actions as |item index Actions|> - + <:label> {{#if (can 'write policy' item=item)}} Edit {{else}} View {{/if}} - + {{#if (can 'delete policy' item=item)}} - + <:label> Delete - - + + <:confirmHeader> Confirm delete - - + + <:confirmBody>

    Are you sure you want to delete this policy?

    -
    - + + <:confirmFooter as |Params|> - +
    {{/if}}
    diff --git a/ui/packages/consul-ui/app/components/consul/role/list/index.hbs b/ui/packages/consul-ui/app/components/consul/role/list/index.hbs index 6b1f0f52505..fbdbfd944bb 100644 --- a/ui/packages/consul-ui/app/components/consul/role/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/role/list/index.hbs @@ -22,30 +22,30 @@ <:actions as |item index Actions|> - + <:label> {{#if (can "write role" item=item)}} Edit {{else}} View {{/if}} - + {{#if (can "delete role" item=item)}} - + <:label> Delete - - + + <:confirmHeader> Confirm delete - - + + <:confirmBody>

    Are you sure you want to delete this role?

    -
    - + + <:confirmFooter as |Params|> - +
    {{/if}}
    diff --git a/ui/packages/consul-ui/app/components/consul/token/list/index.hbs b/ui/packages/consul-ui/app/components/consul/token/list/index.hbs index 1956bfbc1cf..2099b8027ea 100644 --- a/ui/packages/consul-ui/app/components/consul/token/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/token/list/index.hbs @@ -46,74 +46,74 @@ {{/if}} - + <:label> {{#if (can 'write token' item=item)}} Edit {{else}} View {{/if}} - + {{#if (can 'duplicate token' item=item)}} - + <:label> Duplicate - + {{/if}} {{#if (eq item.AccessorID @token.AccessorID)}} - + <:label> Logout - - + + <:confirmHeader> Confirm logout - - + + <:confirmBody>

    Are you sure you want to stop using this ACL token? This will log you out.

    -
    - + + <:confirmFooter as |Params|> - +
    {{else}} - + <:label> Use - - + + <:confirmHeader> Confirm use - - + + <:confirmBody>

    Are you sure you want to use this ACL token?

    -
    - + + <:confirmFooter as |Params|> - +
    {{/if}} {{#if (can 'delete token' item=item token=@token)}} - + <:label> Delete - - + + <:confirmHeader> Confirm delete - - + + <:confirmBody>

    Are you sure you want to delete this token?

    -
    - + + <:confirmFooter as |Params|> - +
    {{/if}} diff --git a/ui/packages/consul-ui/app/components/popover-menu/menu-item/index.hbs b/ui/packages/consul-ui/app/components/popover-menu/menu-item/index.hbs index 3ea7fdb8b79..df2cb1a4326 100644 --- a/ui/packages/consul-ui/app/components/popover-menu/menu-item/index.hbs +++ b/ui/packages/consul-ui/app/components/popover-menu/menu-item/index.hbs @@ -3,9 +3,8 @@ SPDX-License-Identifier: BUSL-1.1 }} -{{yield}}
  • - {{#if this.hasConfirmation}} + {{#if (has-block "confirmFooter")}} {{#if this.formModalActive}} @@ -25,31 +28,35 @@ as |M| > - + {{#if (has-block "confirmHeader")}} + {{yield to="confirmHeader"}} + {{else}} {{yield}} - + {{/if}}

    - + {{#if (has-block "confirmBody")}} + {{yield to="confirmBody"}} + {{else}} {{yield}} - + {{/if}}

    - - + {{#if (has-block "confirmFooter")}} + {{yield (hash button=(component 'popover-menu/menu-item/critical-button' confirmAction=(queue (action this.menu.clickTrigger) (action this.onclick) F.close)) btnAtts=(hash data-test-id='confirm-action') confirmAction=(queue (action this.menu.clickTrigger) (action this.onclick) F.close) close=F.close ) + to="confirmFooter" }} - > + {{else}} {{yield}} - + {{/if}} {{/in-element}} @@ -64,9 +71,11 @@ target={{if external '_blank'}} rel={{if external 'noopener noreferrer'}} > - + {{#if (has-block "label")}} + {{yield to="label"}} + {{else}} {{yield}} - + {{/if}} {{/let}} {{else}} @@ -78,9 +87,11 @@ (action (if this.close this.menu.clickTrigger (noop))) }} > - + {{#if (has-block "label")}} + {{yield to="label"}} + {{else}} {{yield}} - + {{/if}} {{/if}} -
  • \ No newline at end of file + diff --git a/ui/packages/consul-ui/app/components/popover-menu/menu-item/index.js b/ui/packages/consul-ui/app/components/popover-menu/menu-item/index.js index a67bb93e08d..e5abc9ecfdb 100644 --- a/ui/packages/consul-ui/app/components/popover-menu/menu-item/index.js +++ b/ui/packages/consul-ui/app/components/popover-menu/menu-item/index.js @@ -7,9 +7,7 @@ import Component from '@ember/component'; import { inject as service } from '@ember/service'; import { set } from '@ember/object'; -import Slotted from 'block-slots'; - -export default Component.extend(Slotted, { +export default Component.extend({ tagName: '', dom: service('dom'), @@ -31,10 +29,6 @@ export default Component.extend(Slotted, { this._super(...arguments); this.menu.removeSubmenu(this.guid); }, - willRender: function () { - this._super(...arguments); - set(this, 'hasConfirmation', this._isRegistered('confirm-footer')); - }, actions: { activateModal(modalName) { diff --git a/ui/packages/consul-ui/app/components/popover-select/option/index.hbs b/ui/packages/consul-ui/app/components/popover-select/option/index.hbs index 66f4875c979..6ea5682b273 100644 --- a/ui/packages/consul-ui/app/components/popover-select/option/index.hbs +++ b/ui/packages/consul-ui/app/components/popover-select/option/index.hbs @@ -14,8 +14,8 @@ @onclick={{action @onclick this}} @selected={{this.selected}} > - + <:label> {{yield}} - + {{/let}} diff --git a/ui/packages/consul-ui/app/components/role-selector/index.hbs b/ui/packages/consul-ui/app/components/role-selector/index.hbs index 2ac677a39f3..0c0b84bf2e1 100644 --- a/ui/packages/consul-ui/app/components/role-selector/index.hbs +++ b/ui/packages/consul-ui/app/components/role-selector/index.hbs @@ -158,29 +158,29 @@
    - + <:label> {{#if (can "edit role" item=item)}} Edit {{else}} View {{/if}} - + {{#if (not @disabled)}} - + <:label> Remove - - + + <:confirmHeader> Confirm Remove - - + + <:confirmBody> Are you sure you want to remove this role? - - + + <:confirmFooter as |Params|> - + {{/if}} From ddb0b35b5f59c625cc63444d9c586886cce5dc4f Mon Sep 17 00:00:00 2001 From: Suresh Dunga Date: Tue, 21 Apr 2026 16:15:06 +0530 Subject: [PATCH 19/34] replace slots for popover-menu components and it's dependents --- .../consul/auth-method/search-bar/index.hbs | 42 ++++++------ .../consul/health-check/search-bar/index.hbs | 57 ++++++++--------- .../consul/intention/list/table/index.hbs | 9 ++- .../consul/intention/search-bar/index.hbs | 35 +++++----- .../app/components/consul/kv/list/index.hbs | 11 ++-- .../components/consul/kv/search-bar/index.hbs | 35 +++++----- .../consul/node/search-bar/index.hbs | 46 ++++++------- .../consul/nspace/search-bar/index.hbs | 24 ++++--- .../consul/partition/search-bar/index.hbs | 24 ++++--- .../consul/peer/search-bar/index.hbs | 35 +++++----- .../consul/policy/search-bar/index.hbs | 46 ++++++------- .../consul/role/search-bar/index.hbs | 24 ++++--- .../service-instance/search-bar/index.hbs | 33 +++++----- .../consul/service/search-bar/index.hbs | 42 ++++++------ .../consul/token/search-bar/index.hbs | 35 +++++----- .../upstream-instance/search-bar/index.hbs | 24 ++++--- .../consul/upstream/search-bar/index.hbs | 35 +++++----- .../components/more-popover-menu/index.hbs | 10 +-- .../app/components/popover-menu/index.hbs | 16 ++--- .../app/components/popover-menu/index.js | 3 +- .../app/components/popover-select/index.hbs | 64 ++++++++++--------- .../app/components/popover-select/index.js | 3 +- .../app/components/role-selector/index.hbs | 10 +-- 23 files changed, 307 insertions(+), 356 deletions(-) diff --git a/ui/packages/consul-ui/app/components/consul/auth-method/search-bar/index.hbs b/ui/packages/consul-ui/app/components/consul/auth-method/search-bar/index.hbs index 903dff6e5e0..dc4c967a026 100644 --- a/ui/packages/consul-ui/app/components/consul/auth-method/search-bar/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/auth-method/search-bar/index.hbs @@ -49,14 +49,13 @@ @onchange={{action @filter.searchproperty.change}} @multiple={{true}} @required={{true}} - as |components| > - + <:selected> {{t 'common.search.searchproperty'}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each @filter.searchproperty.default as |prop|}} {{/each}} {{/let}} - + @@ -74,14 +73,13 @@ @position='left' @onchange={{action @filter.kind.change}} @multiple={{true}} - as |components| > - + <:selected> {{t 'components.consul.auth-method.search-bar.kind.name'}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{/if}} {{/let}} - - + + - + <:selected> {{t 'components.consul.auth-method.search-bar.locality.name'}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each (array 'local' 'global') as |option|}} - + + <:sort as |search|> - + <:selected> {{#let (from-entries @@ -155,8 +151,8 @@ {{get selectable @sort.value}} {{/let}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{/let}} - - + + diff --git a/ui/packages/consul-ui/app/components/consul/health-check/search-bar/index.hbs b/ui/packages/consul-ui/app/components/consul/health-check/search-bar/index.hbs index e24adef1656..35f63c9ddce 100644 --- a/ui/packages/consul-ui/app/components/consul/health-check/search-bar/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/health-check/search-bar/index.hbs @@ -50,14 +50,13 @@ as |key value|}} @position="right" @onchange={{action @filter.searchproperty.change}} @multiple={{true}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{t "common.search.searchproperty"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each @filter.searchproperty.default as |prop|}} {{/each}} {{/let}} - - + + {{/if}} @@ -75,14 +74,13 @@ as |key value|}} class="type-status" @position="left" @onchange={{action @filter.status.change}} - @multiple={{true}} - as |components|> - + @multiple={{true}}> + <:selected> {{t "common.consul.status"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each (array "passing" "warning" "critical" "empty") as |state|}} {{/each}} {{/let}} - + {{#if @filter.kind}} - + @multiple={{true}}> + <:selected> {{t "components.consul.health-check.search-bar.kind.name"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each (array "service" "node") as |item|}} {{/each}} {{/let}} - + {{/if}} - + @multiple={{true}}> + <:selected> {{t "components.consul.health-check.search-bar.check.name"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each (array "alias" "docker" "grpc" "http" "script" "serf" "tcp" "ttl") as |item|}} {{/each}} {{/let}} - + <:sort as |search|> @@ -156,9 +152,8 @@ as |key value|}} @position="right" @onchange={{action @sort.change}} @multiple={{false}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{#let (from-entries (array (array "Name:asc" (t "common.sort.alpha.asc")) @@ -173,8 +168,8 @@ as |key value|}} {{get selectable @sort.value}} {{/let}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} @@ -189,7 +184,7 @@ as |key value|}} {{/let}} - + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/intention/list/table/index.hbs b/ui/packages/consul-ui/app/components/consul/intention/list/table/index.hbs index 7d8588473b1..302c01cac6d 100644 --- a/ui/packages/consul-ui/app/components/consul/intention/list/table/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/intention/list/table/index.hbs @@ -86,12 +86,11 @@ @expanded={{if (eq checked index) true false}} @onchange={{action change index}} @keyboardAccess={{true}} - as |components api| > - + <:trigger> More - - + + <:menu as |components api confirm keypressClick change|> {{#if (can 'write intention' item=item)}} <:label> @@ -159,7 +158,7 @@ {{/if}} - + diff --git a/ui/packages/consul-ui/app/components/consul/intention/search-bar/index.hbs b/ui/packages/consul-ui/app/components/consul/intention/search-bar/index.hbs index c8952122812..db640e7042c 100644 --- a/ui/packages/consul-ui/app/components/consul/intention/search-bar/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/intention/search-bar/index.hbs @@ -50,14 +50,13 @@ as |key value|}} @position="right" @onchange={{action @filter.searchproperty.change}} @multiple={{true}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{t "common.search.searchproperty"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each @filter.searchproperty.default as |prop|}} {{/each}} {{/let}} - - + + {{/if}} @@ -75,14 +74,13 @@ as |key value|}} class="type-access" @position="left" @onchange={{action @filter.access.change}} - @multiple={{true}} - as |components|> - + @multiple={{true}}> + <:selected> {{t "components.consul.intention.search-bar.access.name"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each (array "allow" "deny" "") as |item|}} {{/each}} {{/let}} - + <:sort as |search|> @@ -100,9 +98,8 @@ as |key value|}} @position="right" @onchange={{action @sort.change}} @multiple={{false}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{#let (from-entries (array (array "Action:asc" (t "components.consul.intention.search-bar.sort.access.asc")) @@ -119,8 +116,8 @@ as |key value|}} {{get selectable @sort.value}} {{/let}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} @@ -139,7 +136,7 @@ as |key value|}} {{/let}} - + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/kv/list/index.hbs b/ui/packages/consul-ui/app/components/consul/kv/list/index.hbs index c75be1cc18b..f1b5cdf391b 100644 --- a/ui/packages/consul-ui/app/components/consul/kv/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/kv/list/index.hbs @@ -20,12 +20,11 @@ @expanded={{if (eq checked index) true false}} @onchange={{action change index}} @keyboardAccess={{true}} - as |components api| > - + <:trigger> More - - + + <:menu as |components api confirm keypressClick|> {{#if (can 'write kv' item=item)}} {{/if}} - + - \ No newline at end of file + diff --git a/ui/packages/consul-ui/app/components/consul/kv/search-bar/index.hbs b/ui/packages/consul-ui/app/components/consul/kv/search-bar/index.hbs index 1d4aa2cc4f3..199c734de8b 100644 --- a/ui/packages/consul-ui/app/components/consul/kv/search-bar/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/kv/search-bar/index.hbs @@ -50,14 +50,13 @@ as |key value|}} @position="right" @onchange={{action @filter.searchproperty.change}} @multiple={{true}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{t "common.search.searchproperty"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each @filter.searchproperty.default as |prop|}} {{/each}} {{/let}} - - + + {{/if}} @@ -75,14 +74,13 @@ as |key value|}} class="type-kind" @position="left" @onchange={{action @filter.kind.change}} - @multiple={{true}} - as |components|> - + @multiple={{true}}> + <:selected> {{t "components.consul.kv.search-bar.kind.name"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each (array "folder" "key") as |item|}} {{/each}} {{/let}} - + <:sort as |search|> @@ -100,9 +98,8 @@ as |key value|}} @position="right" @onchange={{action @sort.change}} @multiple={{false}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{#let (from-entries (array (array "Key:asc" (t "common.sort.alpha.asc")) @@ -115,8 +112,8 @@ as |key value|}} {{get selectable @sort.value}} {{/let}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} @@ -127,7 +124,7 @@ as |key value|}} {{/let}} - + diff --git a/ui/packages/consul-ui/app/components/consul/node/search-bar/index.hbs b/ui/packages/consul-ui/app/components/consul/node/search-bar/index.hbs index d7bdde58a59..c83ac28d6f4 100644 --- a/ui/packages/consul-ui/app/components/consul/node/search-bar/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/node/search-bar/index.hbs @@ -52,14 +52,13 @@ as |key value|}} @position="right" @onchange={{action @filter.searchproperty.change}} @multiple={{true}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{t "common.search.searchproperty"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each @filter.searchproperty.default as |prop|}} {{/each}} {{/let}} - - + + <:filter as |search|> @@ -76,14 +75,13 @@ as |key value|}} class="type-status" @position="left" @onchange={{action @filter.status.change}} - @multiple={{true}} - as |components|> - + @multiple={{true}}> + <:selected> {{t "common.consul.status"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each (array "passing" "warning" "critical") as |state|}} {{/each}} {{/let}} - + - + @multiple={{true}}> + <:selected> {{t "common.consul.version"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each @versions as |version|}} {{/each}} {{/let}} - + <:sort as |search|> @@ -126,9 +123,8 @@ as |key value|}} @position="right" @onchange={{action @sort.change}} @multiple={{false}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{#let (from-entries (array (array "Node:asc" (t "common.sort.alpha.asc")) @@ -143,8 +139,8 @@ as |key value|}} {{get selectable @sort.value}} {{/let}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} @@ -159,7 +155,7 @@ as |key value|}} {{/let}} - + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/nspace/search-bar/index.hbs b/ui/packages/consul-ui/app/components/consul/nspace/search-bar/index.hbs index f438d18dce2..acd5e361ba9 100644 --- a/ui/packages/consul-ui/app/components/consul/nspace/search-bar/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/nspace/search-bar/index.hbs @@ -50,14 +50,13 @@ as |key value|}} @position="right" @onchange={{action @filter.searchproperty.change}} @multiple={{true}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{t "common.search.searchproperty"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each @filter.searchproperty.default as |prop|}} {{/each}} {{/let}} - - + + <:sort as |search|> @@ -76,9 +75,8 @@ as |key value|}} @position="right" @onchange={{action @sort.change}} @multiple={{false}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{#let (from-entries (array (array "Name:asc" (t "common.sort.alpha.asc")) @@ -89,15 +87,15 @@ as |key value|}} {{get selectable @sort.value}} {{/let}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{/let}} - + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/partition/search-bar/index.hbs b/ui/packages/consul-ui/app/components/consul/partition/search-bar/index.hbs index 56fa44084a7..4238b101735 100644 --- a/ui/packages/consul-ui/app/components/consul/partition/search-bar/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/partition/search-bar/index.hbs @@ -50,14 +50,13 @@ as |key value|}} @position="right" @onchange={{action @filter.searchproperty.change}} @multiple={{true}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{t "common.search.searchproperty"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each @filter.searchproperty.default as |prop|}} {{/each}} {{/let}} - - + + <:sort as |search|> @@ -76,9 +75,8 @@ as |key value|}} @position="right" @onchange={{action @sort.change}} @multiple={{false}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{#let (from-entries (array (array "Name:asc" (t "common.sort.alpha.asc")) @@ -89,15 +87,15 @@ as |key value|}} {{get selectable @sort.value}} {{/let}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{/let}} - + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/peer/search-bar/index.hbs b/ui/packages/consul-ui/app/components/consul/peer/search-bar/index.hbs index 475c8a2b5a1..c6c93789d5b 100644 --- a/ui/packages/consul-ui/app/components/consul/peer/search-bar/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/peer/search-bar/index.hbs @@ -50,14 +50,13 @@ as |key value|}} @position="right" @onchange={{action @filter.searchproperty.change}} @multiple={{true}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{t "common.search.searchproperty"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each @filter.searchproperty.default as |prop|}} {{/each}} {{/let}} - - + + <:filter as |search|> @@ -74,14 +73,13 @@ as |key value|}} class="type-state" @position="left" @onchange={{action @filter.state.change}} - @multiple={{true}} - as |components|> - + @multiple={{true}}> + <:selected> {{t "components.consul.peer.search-bar.state.name"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each (get @@ -102,7 +100,7 @@ as |key value|}} {{/let}} {{/each}} {{/let}} - + <:sort as |search|> @@ -112,9 +110,8 @@ as |key value|}} @position="right" @onchange={{action @sort.change}} @multiple={{false}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{#let (from-entries (array (array "Name:asc" (t "common.sort.alpha.asc")) @@ -127,8 +124,8 @@ as |key value|}} {{get selectable @sort.value}} {{/let}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} @@ -139,7 +136,7 @@ as |key value|}} {{/let}} - + diff --git a/ui/packages/consul-ui/app/components/consul/policy/search-bar/index.hbs b/ui/packages/consul-ui/app/components/consul/policy/search-bar/index.hbs index 6d9358f5189..27b9b075c6f 100644 --- a/ui/packages/consul-ui/app/components/consul/policy/search-bar/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/policy/search-bar/index.hbs @@ -50,14 +50,13 @@ as |key value|}} @position="right" @onchange={{action @filter.searchproperty.change}} @multiple={{true}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{t "common.search.searchproperty"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each @filter.searchproperty.default as |prop|}} {{/each}} {{/let}} - - + + <:filter as |search|> @@ -74,14 +73,13 @@ as |key value|}} class="type-datacenter" @position="left" @onchange={{action @filter.datacenter.change}} - @multiple={{true}} - as |components|> - + @multiple={{true}}> + <:selected> {{t "common.consul.datacenter"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each this.dcs as |dc|}} @@ -96,20 +94,19 @@ as |key value|}} @onchange={{action (mut this.dcs) value="data"}} /> {{/let}} - + - + @multiple={{true}}> + <:selected> {{t "components.consul.policy.search-bar.kind.name"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each (array "global-management" "standard") as |state|}} {{/each}} {{/let}} - + <:sort as |search|> @@ -131,9 +128,8 @@ as |key value|}} @position="right" @onchange={{action @sort.change}} @multiple={{false}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{#let (from-entries (array (array "Name:asc" (t "common.sort.alpha.asc")) @@ -144,15 +140,15 @@ as |key value|}} {{get selectable @sort.value}} {{/let}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{/let}} - + diff --git a/ui/packages/consul-ui/app/components/consul/role/search-bar/index.hbs b/ui/packages/consul-ui/app/components/consul/role/search-bar/index.hbs index e58979f54ca..75934a84c23 100644 --- a/ui/packages/consul-ui/app/components/consul/role/search-bar/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/role/search-bar/index.hbs @@ -50,14 +50,13 @@ as |key value|}} @position="right" @onchange={{action @filter.searchproperty.change}} @multiple={{true}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{t "common.search.searchproperty"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each @filter.searchproperty.default as |prop|}} {{/each}} {{/let}} - - + + <:sort as |search|> @@ -76,9 +75,8 @@ as |key value|}} @position="right" @onchange={{action @sort.change}} @multiple={{false}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{#let (from-entries (array (array "Name:asc" (t "common.sort.alpha.asc")) @@ -91,8 +89,8 @@ as |key value|}} {{get selectable @sort.value}} {{/let}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} @@ -103,7 +101,7 @@ as |key value|}} {{/let}} - + diff --git a/ui/packages/consul-ui/app/components/consul/service-instance/search-bar/index.hbs b/ui/packages/consul-ui/app/components/consul/service-instance/search-bar/index.hbs index c01b478f19f..d3359b205a2 100644 --- a/ui/packages/consul-ui/app/components/consul/service-instance/search-bar/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/service-instance/search-bar/index.hbs @@ -50,14 +50,13 @@ @onchange={{action @filter.searchproperty.change}} @multiple={{true}} @required={{true}} - as |components| > - + <:selected> {{t 'common.search.searchproperty'}} - - + + <:options as |components|> {{#let components.Option as |Option|}} {{#each @filter.searchproperty.default as |prop|}} {{/each}} {{/let}} - - + + {{/if}} @@ -76,14 +75,13 @@ @position='left' @onchange={{action @filter.status.change}} @multiple={{true}} - as |components| > - + <:selected> {{t 'common.consul.status'}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each (array 'passing' 'warning' 'critical' 'empty') as |state|}} - + + {{#if (gt @sources.length 0)}} - + <:selected> {{#let (from-entries @@ -139,8 +136,8 @@ {{get selectable @sort.value}} {{/let}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{/let}} - - + + diff --git a/ui/packages/consul-ui/app/components/consul/service/search-bar/index.hbs b/ui/packages/consul-ui/app/components/consul/service/search-bar/index.hbs index 339d0264b29..f69fe5b6097 100644 --- a/ui/packages/consul-ui/app/components/consul/service/search-bar/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/service/search-bar/index.hbs @@ -44,14 +44,13 @@ @onchange={{action @filter.searchproperty.change}} @multiple={{true}} @required={{true}} - as |components| > - + <:selected> {{t 'common.search.searchproperty'}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each @filter.searchproperty.default as |prop|}} {{/each}} {{/let}} - + @@ -69,14 +68,13 @@ @position='left' @onchange={{action @filter.status.change}} @multiple={{true}} - as |components| > - + <:selected> {{t 'common.consul.status'}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each this.healthStates as |state|}} - + + - + <:selected> {{t 'components.consul.service.search-bar.kind'}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} - + + {{#if (gt @sources.length 0)}} - + <:selected> {{#let (from-entries @@ -165,8 +161,8 @@ {{get selectable @sort.value}} {{/let}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{/let}} - - + + diff --git a/ui/packages/consul-ui/app/components/consul/token/search-bar/index.hbs b/ui/packages/consul-ui/app/components/consul/token/search-bar/index.hbs index a55ba4ce692..182d19fd43a 100644 --- a/ui/packages/consul-ui/app/components/consul/token/search-bar/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/token/search-bar/index.hbs @@ -50,14 +50,13 @@ as |key value|}} @position="right" @onchange={{action @filter.searchproperty.change}} @multiple={{true}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{t "common.search.searchproperty"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each @filter.searchproperty.default as |prop|}} {{/each}} {{/let}} - - + + <:filter as |search|> @@ -74,14 +73,13 @@ as |key value|}} class="type-status" @position="left" @onchange={{action @filter.kind.change}} - @multiple={{true}} - as |components|> - + @multiple={{true}}> + <:selected> {{t "components.consul.token.search-bar.kind.name"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each (array "global-management" "global" "local") as |state|}} {{/each}} {{/let}} - + <:sort as |search|> @@ -103,9 +101,8 @@ as |key value|}} @position="right" @onchange={{action @sort.change}} @multiple={{false}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{#let (from-entries (array (array "CreateTime:desc" (t "common.sort.age.desc")) @@ -116,15 +113,15 @@ as |key value|}} {{get selectable @sort.value}} {{/let}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{/let}} - + diff --git a/ui/packages/consul-ui/app/components/consul/upstream-instance/search-bar/index.hbs b/ui/packages/consul-ui/app/components/consul/upstream-instance/search-bar/index.hbs index e16b89f8102..a9c5d8e1f15 100644 --- a/ui/packages/consul-ui/app/components/consul/upstream-instance/search-bar/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/upstream-instance/search-bar/index.hbs @@ -50,14 +50,13 @@ as |key value|}} @position="right" @onchange={{action @filter.searchproperty.change}} @multiple={{true}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{t "common.search.searchproperty"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each @filter.searchproperty.default as |prop|}} {{/each}} {{/let}} - - + + <:sort as |search|> @@ -76,9 +75,8 @@ as |key value|}} @position="right" @onchange={{action @sort.change}} @multiple={{false}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{#let (from-entries (array (array "DestinationName:asc" (t "common.sort.alpha.asc")) @@ -89,13 +87,13 @@ as |key value|}} {{get selectable @sort.value}} {{/let}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{/let}} - + diff --git a/ui/packages/consul-ui/app/components/consul/upstream/search-bar/index.hbs b/ui/packages/consul-ui/app/components/consul/upstream/search-bar/index.hbs index 5600efc1726..bb3556c8604 100644 --- a/ui/packages/consul-ui/app/components/consul/upstream/search-bar/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/upstream/search-bar/index.hbs @@ -50,14 +50,13 @@ as |key value|}} @position="right" @onchange={{action @filter.searchproperty.change}} @multiple={{true}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{t "common.search.searchproperty"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each @filter.searchproperty.default as |prop|}} {{/each}} {{/let}} - - + + <:filter as |search|> - + @multiple={{true}}> + <:selected> {{t "components.consul.upstream.search-bar.instance.name"}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each (array "registered" "not-registered") as |item|}} {{/each}} {{/let}} - + <:sort as |search|> @@ -98,9 +96,8 @@ as |key value|}} @position="right" @onchange={{action @sort.change}} @multiple={{false}} - @required={{true}} - as |components|> - + @required={{true}}> + <:selected> {{#let (from-entries (array (array "Name:asc" (t "common.sort.alpha.asc")) @@ -113,8 +110,8 @@ as |key value|}} {{get selectable @sort.value}} {{/let}} - - + + <:options as |components|> {{#let components.Optgroup components.Option as |Optgroup Option|}} @@ -125,7 +122,7 @@ as |key value|}} {{/let}} - + diff --git a/ui/packages/consul-ui/app/components/more-popover-menu/index.hbs b/ui/packages/consul-ui/app/components/more-popover-menu/index.hbs index e9d9255e3de..c54bb60d035 100644 --- a/ui/packages/consul-ui/app/components/more-popover-menu/index.hbs +++ b/ui/packages/consul-ui/app/components/more-popover-menu/index.hbs @@ -11,12 +11,12 @@ @expanded={{@expanded}} @onchange={{action @onchange}} @keyboardAccess={{true}} - as |components api|> - + > + <:trigger> More - - + + <:menu as |components api|> {{yield components.MenuItem}} - + diff --git a/ui/packages/consul-ui/app/components/popover-menu/index.hbs b/ui/packages/consul-ui/app/components/popover-menu/index.hbs index 3bba80f964b..002cb048da7 100644 --- a/ui/packages/consul-ui/app/components/popover-menu/index.hbs +++ b/ui/packages/consul-ui/app/components/popover-menu/index.hbs @@ -3,7 +3,6 @@ SPDX-License-Identifier: BUSL-1.1 }} -{{yield}}
    @@ -53,13 +50,12 @@ as |api|}} {{/each}} <:header> - {{yield components api}} - {{#yield-slot name="header"}}{{else}}{{/yield-slot}} + {{#if (has-block "header")}} + {{yield components api to="header"}} + {{/if}} <:menu> - - {{yield components api}} - + {{yield components api (concat "popover-menu-" this.guid "-") keypressClick this.toggle.click to="menu"}} @@ -67,4 +63,4 @@ as |api|}} {{/let}} -
    \ No newline at end of file + diff --git a/ui/packages/consul-ui/app/components/popover-menu/index.js b/ui/packages/consul-ui/app/components/popover-menu/index.js index ceb5e34ada8..b77e689fba1 100644 --- a/ui/packages/consul-ui/app/components/popover-menu/index.js +++ b/ui/packages/consul-ui/app/components/popover-menu/index.js @@ -6,10 +6,9 @@ /*eslint ember/closure-actions: "warn"*/ import Component from '@ember/component'; import { inject as service } from '@ember/service'; -import Slotted from 'block-slots'; import { set } from '@ember/object'; -export default Component.extend(Slotted, { +export default Component.extend({ tagName: '', dom: service('dom'), expanded: false, diff --git a/ui/packages/consul-ui/app/components/popover-select/index.hbs b/ui/packages/consul-ui/app/components/popover-select/index.hbs index b3d6d9a349d..3b9a5ca2c64 100644 --- a/ui/packages/consul-ui/app/components/popover-select/index.hbs +++ b/ui/packages/consul-ui/app/components/popover-select/index.hbs @@ -7,35 +7,41 @@ class="popover-select" ...attributes @position={{or @position "left"}} - as |components menu| > - {{yield}} - {{#let - (component 'popover-select/optgroup' components=components) - (component 'popover-select/option' - select=this components=components - onclick=(pipe - (action "click") - (if this.multiple (noop) menu.toggle) + <:trigger as |components menu|> + {{#let + (component 'popover-select/optgroup' components=components) + (component 'popover-select/option' + select=this components=components + onclick=(pipe + (action "click") + (if this.multiple (noop) menu.toggle) + ) ) - ) - as |Optgroup Option| - }} - - - {{yield (hash - Optgroup=Optgroup - Option=Option - )}} - - - - - {{yield (hash - Optgroup=Optgroup - Option=Option - )}} - - - {{/let}} + as |Optgroup Option| + }} + {{yield (hash + Optgroup=Optgroup + Option=Option + ) to="selected"}} + {{/let}} + + <:menu as |components menu|> + {{#let + (component 'popover-select/optgroup' components=components) + (component 'popover-select/option' + select=this components=components + onclick=(pipe + (action "click") + (if this.multiple (noop) menu.toggle) + ) + ) + as |Optgroup Option| + }} + {{yield (hash + Optgroup=Optgroup + Option=Option + ) to="options"}} + {{/let}} + diff --git a/ui/packages/consul-ui/app/components/popover-select/index.js b/ui/packages/consul-ui/app/components/popover-select/index.js index 33f5560bc39..564a16994e5 100644 --- a/ui/packages/consul-ui/app/components/popover-select/index.js +++ b/ui/packages/consul-ui/app/components/popover-select/index.js @@ -5,9 +5,8 @@ import Component from '@ember/component'; import { inject as service } from '@ember/service'; -import Slotted from 'block-slots'; -export default Component.extend(Slotted, { +export default Component.extend({ tagName: '', dom: service('dom'), multiple: false, diff --git a/ui/packages/consul-ui/app/components/role-selector/index.hbs b/ui/packages/consul-ui/app/components/role-selector/index.hbs index 0c0b84bf2e1..6b91328918d 100644 --- a/ui/packages/consul-ui/app/components/role-selector/index.hbs +++ b/ui/packages/consul-ui/app/components/role-selector/index.hbs @@ -152,11 +152,11 @@ <:actions as |item index change checked|> - - + + <:trigger> More - - + + <:menu as |components confirm keypressClick|> <:label> {{#if (can "edit role" item=item)}} @@ -183,7 +183,7 @@ {{/if}} - + From 9fdd4d7ee7412d002759fb27925bec622fdd20d8 Mon Sep 17 00:00:00 2001 From: Suresh Dunga Date: Tue, 21 Apr 2026 16:38:59 +0530 Subject: [PATCH 20/34] fix conditional rendering of named blocks --- ui/packages/consul-ui/app/components/app-view/index.hbs | 2 +- ui/packages/consul-ui/app/templates/dc/kv/index.hbs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ui/packages/consul-ui/app/components/app-view/index.hbs b/ui/packages/consul-ui/app/components/app-view/index.hbs index a70f6cfee53..a0f4fb8350c 100644 --- a/ui/packages/consul-ui/app/components/app-view/index.hbs +++ b/ui/packages/consul-ui/app/components/app-view/index.hbs @@ -12,7 +12,7 @@