From d1019c25cedc87eff0879bd6ea2fcd48484b1b59 Mon Sep 17 00:00:00 2001 From: wenincode Date: Mon, 24 Oct 2022 13:39:28 -0600 Subject: [PATCH 01/16] Use FlightIcon component for external sources --- .../consul/external-source/index.hbs | 6 ++- .../consul/external-source/index.scss | 52 +++++++++---------- .../consul-ui/app/components/pill/index.scss | 6 +-- .../app/helpers/external-source-icon-map.js | 19 +++++++ ui/packages/consul-ui/package.json | 2 +- ui/yarn.lock | 15 ++++++ 6 files changed, 68 insertions(+), 32 deletions(-) create mode 100644 ui/packages/consul-ui/app/helpers/external-source-icon-map.js diff --git a/ui/packages/consul-ui/app/components/consul/external-source/index.hbs b/ui/packages/consul-ui/app/components/consul/external-source/index.hbs index a2ee22a001..a910e69ee6 100644 --- a/ui/packages/consul-ui/app/components/consul/external-source/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/external-source/index.hbs @@ -5,9 +5,10 @@
+ Registered via {{t (concat "common.brand." externalSource)}}
@@ -32,9 +33,10 @@ {{else if externalSource}} + {{#if @label}} {{@label}} {{else}} diff --git a/ui/packages/consul-ui/app/components/consul/external-source/index.scss b/ui/packages/consul-ui/app/components/consul/external-source/index.scss index 0b6656edef..9b992c9413 100644 --- a/ui/packages/consul-ui/app/components/consul/external-source/index.scss +++ b/ui/packages/consul-ui/app/components/consul/external-source/index.scss @@ -6,32 +6,32 @@ --icon-size: icon-300; } -.consul-external-source.kubernetes::before { - @extend %with-logo-kubernetes-color-icon, %as-pseudo; -} -.consul-external-source.terraform::before { - @extend %with-logo-terraform-color-icon, %as-pseudo; -} -.consul-external-source.nomad::before { - @extend %with-logo-nomad-color-icon, %as-pseudo; -} -.consul-external-source.consul::before, -.consul-external-source.consul-api-gateway::before { - @extend %with-logo-consul-color-icon, %as-pseudo; -} -.consul-external-source.vault::before { - @extend %with-vault-300; -} -.consul-external-source.lambda::before, -.consul-external-source.aws::before { - @extend %with-aws-300; -} -.consul-external-source.leader::before { - @extend %with-star-outline-mask, %as-pseudo; -} -.consul-external-source.jwt::before { - @extend %with-logo-jwt-color-icon, %as-pseudo; -} +// .consul-external-source.kubernetes::before { +// @extend %with-logo-kubernetes-color-icon, %as-pseudo; +// } +// .consul-external-source.terraform::before { +// @extend %with-logo-terraform-color-icon, %as-pseudo; +// } +// .consul-external-source.nomad::before { +// @extend %with-logo-nomad-color-icon, %as-pseudo; +// } +// .consul-external-source.consul::before, +// .consul-external-source.consul-api-gateway::before { +// @extend %with-logo-consul-color-icon, %as-pseudo; +// } +// .consul-external-source.vault::before { +// @extend %with-vault-300; +// } +// .consul-external-source.lambda::before, +// .consul-external-source.aws::before { +// @extend %with-aws-300; +// } +// .consul-external-source.leader::before { +// @extend %with-star-outline-mask, %as-pseudo; +// } +// .consul-external-source.jwt::before { +// @extend %with-logo-jwt-color-icon, %as-pseudo; +// } .consul-external-source.oidc::before { @extend %with-logo-oidc-color-icon, %as-pseudo; } diff --git a/ui/packages/consul-ui/app/components/pill/index.scss b/ui/packages/consul-ui/app/components/pill/index.scss index c528bd9ff3..6e2a82faf7 100644 --- a/ui/packages/consul-ui/app/components/pill/index.scss +++ b/ui/packages/consul-ui/app/components/pill/index.scss @@ -30,9 +30,9 @@ span.policy-service-identity::before { %pill.oidc::before { @extend %with-logo-oidc-color-icon, %as-pseudo; } -%pill.kubernetes::before { - @extend %with-logo-kubernetes-color-icon, %as-pseudo; -} +// %pill.kubernetes::before { +// @extend %with-logo-kubernetes-color-icon, %as-pseudo; +// } %pill.aws-iam::before { --icon-name: icon-aws-color; content: ''; diff --git a/ui/packages/consul-ui/app/helpers/external-source-icon-map.js b/ui/packages/consul-ui/app/helpers/external-source-icon-map.js new file mode 100644 index 0000000000..5a657b98d8 --- /dev/null +++ b/ui/packages/consul-ui/app/helpers/external-source-icon-map.js @@ -0,0 +1,19 @@ +import { helper } from '@ember/component/helper'; + +const EXTERNAL_SOURCE_ICON_MAP = { + kubernetes: 'kubernetes-color', + terraform: 'terraform-color', + nomad: 'nomad-color', + consul: 'consul-color', + 'consul-api-gateway': 'consul-color', + vault: 'vault', + jwt: 'jwt-color', + aws: 'aws-color', + lambda: 'aws-lambda-color', +}; + +function externalSourceIconMap([icon]) { + return EXTERNAL_SOURCE_ICON_MAP[icon]; +} + +export default helper(externalSourceIconMap); diff --git a/ui/packages/consul-ui/package.json b/ui/packages/consul-ui/package.json index 54bf1e27ab..71e5890ab7 100644 --- a/ui/packages/consul-ui/package.json +++ b/ui/packages/consul-ui/package.json @@ -70,7 +70,7 @@ "@hashicorp/design-system-components": "^1.0.4", "@hashicorp/design-system-tokens": "^1.0.0", "@hashicorp/ember-cli-api-double": "^4.0.0", - "@hashicorp/ember-flight-icons": "^2.0.12", + "@hashicorp/ember-flight-icons": "^3.0.0", "@html-next/vertical-collection": "^4.0.0", "@lit/reactive-element": "^1.2.1", "@xstate/fsm": "^1.4.0", diff --git a/ui/yarn.lock b/ui/yarn.lock index 3716786318..0d7746cc15 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -3315,11 +3315,26 @@ ember-cli-babel "^7.26.11" ember-cli-htmlbars "^6.0.1" +"@hashicorp/ember-flight-icons@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@hashicorp/ember-flight-icons/-/ember-flight-icons-3.0.0.tgz#fddeb8adfb036aa3573c55b7236b34172b49cba9" + integrity sha512-+QrV38Ix9dWLwMzdVcMcSmFfeSVGvWvB+3OVBq3ltOTmnoLPIAx8LT9UDZUZ1wa65ciO+a1YzLMmwWnQgX/r9Q== + dependencies: + "@hashicorp/flight-icons" "^2.11.0" + ember-auto-import "^2.4.1" + ember-cli-babel "^7.26.11" + ember-cli-htmlbars "^6.0.1" + "@hashicorp/flight-icons@^2.10.0": version "2.10.0" resolved "https://registry.yarnpkg.com/@hashicorp/flight-icons/-/flight-icons-2.10.0.tgz#24b03043bacda16e505200e6591dfef896ddacf1" integrity sha512-jYUA0M6Tz+4RAudil+GW/fHbhZPcKCiIZZAguBDviqbLneMkMgPOBgbXWCGWsEQ1fJzP2cXbUaio8L0aQZPWQw== +"@hashicorp/flight-icons@^2.11.0": + version "2.11.0" + resolved "https://registry.yarnpkg.com/@hashicorp/flight-icons/-/flight-icons-2.11.0.tgz#1500be99a42ee8512e7caece4bdae60ce8790577" + integrity sha512-teFkUY2di63JZ2gsegQgS+3f5YEP+GPuycB1Z2O+weInIrL33Ds0/J+lxFCmi2vkPAeY5xOnsclHYnhU6xOSmA== + "@html-next/vertical-collection@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@html-next/vertical-collection/-/vertical-collection-4.0.0.tgz#b3b3d52358e15e7ed46e028d12424dab994690ed" From 19e99f0188fed5331e808ddfbc632393e07fd552 Mon Sep 17 00:00:00 2001 From: wenincode Date: Tue, 25 Oct 2022 07:14:55 -0600 Subject: [PATCH 02/16] Update icon-map to work for auth methods --- .../consul/auth-method/type/index.hbs | 12 ++++++-- .../consul/external-source/index.hbs | 4 +-- .../consul/external-source/index.scss | 6 ++-- .../consul-ui/app/components/pill/index.scss | 8 +++--- .../app/helpers/external-source-icon-map.js | 19 ------------- .../consul-ui/app/helpers/icon-mapping.js | 28 +++++++++++++++++++ 6 files changed, 46 insertions(+), 31 deletions(-) delete mode 100644 ui/packages/consul-ui/app/helpers/external-source-icon-map.js create mode 100644 ui/packages/consul-ui/app/helpers/icon-mapping.js diff --git a/ui/packages/consul-ui/app/components/consul/auth-method/type/index.hbs b/ui/packages/consul-ui/app/components/consul/auth-method/type/index.hbs index 6aadacc3ca..dc958b68a0 100644 --- a/ui/packages/consul-ui/app/components/consul/auth-method/type/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/auth-method/type/index.hbs @@ -1,3 +1,9 @@ - - {{t (concat "common.brand." @item.Type)}} - +{{#let (icon-mapping @item.Type) as |flightIcon|}} + {{log flightIcon}} + + {{#if flightIcon}} + + {{/if}} + {{t (concat "common.brand." @item.Type)}} + +{{/let}} diff --git a/ui/packages/consul-ui/app/components/consul/external-source/index.hbs b/ui/packages/consul-ui/app/components/consul/external-source/index.hbs index a910e69ee6..86742d4314 100644 --- a/ui/packages/consul-ui/app/components/consul/external-source/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/external-source/index.hbs @@ -8,7 +8,7 @@ class="consul-external-source" ...attributes > - + Registered via {{t (concat "common.brand." externalSource)}} @@ -36,7 +36,7 @@ class="consul-external-source" ...attributes > - + {{#if @label}} {{@label}} {{else}} diff --git a/ui/packages/consul-ui/app/components/consul/external-source/index.scss b/ui/packages/consul-ui/app/components/consul/external-source/index.scss index 9b992c9413..21232a860e 100644 --- a/ui/packages/consul-ui/app/components/consul/external-source/index.scss +++ b/ui/packages/consul-ui/app/components/consul/external-source/index.scss @@ -29,9 +29,9 @@ // .consul-external-source.leader::before { // @extend %with-star-outline-mask, %as-pseudo; // } -// .consul-external-source.jwt::before { -// @extend %with-logo-jwt-color-icon, %as-pseudo; -// } +.consul-external-source.jwt::before { + @extend %with-logo-jwt-color-icon, %as-pseudo; +} .consul-external-source.oidc::before { @extend %with-logo-oidc-color-icon, %as-pseudo; } diff --git a/ui/packages/consul-ui/app/components/pill/index.scss b/ui/packages/consul-ui/app/components/pill/index.scss index 6e2a82faf7..9beab83163 100644 --- a/ui/packages/consul-ui/app/components/pill/index.scss +++ b/ui/packages/consul-ui/app/components/pill/index.scss @@ -33,7 +33,7 @@ span.policy-service-identity::before { // %pill.kubernetes::before { // @extend %with-logo-kubernetes-color-icon, %as-pseudo; // } -%pill.aws-iam::before { - --icon-name: icon-aws-color; - content: ''; -} +// %pill.aws-iam::before { +// --icon-name: icon-aws-color; +// content: ''; +// } diff --git a/ui/packages/consul-ui/app/helpers/external-source-icon-map.js b/ui/packages/consul-ui/app/helpers/external-source-icon-map.js deleted file mode 100644 index 5a657b98d8..0000000000 --- a/ui/packages/consul-ui/app/helpers/external-source-icon-map.js +++ /dev/null @@ -1,19 +0,0 @@ -import { helper } from '@ember/component/helper'; - -const EXTERNAL_SOURCE_ICON_MAP = { - kubernetes: 'kubernetes-color', - terraform: 'terraform-color', - nomad: 'nomad-color', - consul: 'consul-color', - 'consul-api-gateway': 'consul-color', - vault: 'vault', - jwt: 'jwt-color', - aws: 'aws-color', - lambda: 'aws-lambda-color', -}; - -function externalSourceIconMap([icon]) { - return EXTERNAL_SOURCE_ICON_MAP[icon]; -} - -export default helper(externalSourceIconMap); diff --git a/ui/packages/consul-ui/app/helpers/icon-mapping.js b/ui/packages/consul-ui/app/helpers/icon-mapping.js new file mode 100644 index 0000000000..9f561836e5 --- /dev/null +++ b/ui/packages/consul-ui/app/helpers/icon-mapping.js @@ -0,0 +1,28 @@ +import { helper } from '@ember/component/helper'; + +const ICON_MAPPING = { + kubernetes: 'kubernetes-color', + terraform: 'terraform-color', + nomad: 'nomad-color', + consul: 'consul-color', + 'consul-api-gateway': 'consul-color', + vault: 'vault', + aws: 'aws-color', + 'aws-iam': 'aws-color', + lambda: 'aws-lambda-color', +}; + +/** + * Takes a icon name, usually an external-source/auth-method-type, and maps it to a flight-icon name or returns undefined + * if the icon is not currently mapped to a flight-icon name. This is particularly useful when dealing with converting icons to + * use the `` component directly instead of our own css. If the icon is not available with `` you can leave + * it out of the mapping and handle it in the undefined case. + * + * @param {string} icon + * @returns {string|undefined} + */ +function iconMapping([icon]) { + return ICON_MAPPING[icon]; +} + +export default helper(iconMapping); From 4d47dd78e7d2d8334dcf31993337a990b72b33fa Mon Sep 17 00:00:00 2001 From: wenincode Date: Tue, 25 Oct 2022 11:12:15 -0600 Subject: [PATCH 03/16] Share code with new icons for sources select --- .../consul/external-source/index.scss | 4 + .../service-instance/search-bar/index.hbs | 270 +++++++++--------- .../consul/service/search-bar/index.hbs | 34 +-- .../consul/service/search-bar/index.js | 1 + .../consul/sources-select/index.hbs | 25 ++ 5 files changed, 173 insertions(+), 161 deletions(-) create mode 100644 ui/packages/consul-ui/app/components/consul/sources-select/index.hbs diff --git a/ui/packages/consul-ui/app/components/consul/external-source/index.scss b/ui/packages/consul-ui/app/components/consul/external-source/index.scss index 21232a860e..98c8d76f3d 100644 --- a/ui/packages/consul-ui/app/components/consul/external-source/index.scss +++ b/ui/packages/consul-ui/app/components/consul/external-source/index.scss @@ -2,6 +2,10 @@ @extend %pill-200, %frame-gray-600, %p1; } +.consul-external-source > svg { + color: rgb(var(--black)); +} + .consul-external-source::before { --icon-size: icon-300; } 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 b8fdbcf9af..919926b04f 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 @@ -1,156 +1,160 @@ - - <:status as |search|> + + <:status as |search|> -{{#let - - (t (concat "components.consul.service-instance.search-bar." search.status.key ".name") - default=(array - (concat "common.search." search.status.key) - (concat "common.consul." search.status.key) + {{#let + (t + (concat 'components.consul.service-instance.search-bar.' search.status.key '.name') + default=(array + (concat 'common.search.' search.status.key) (concat 'common.consul.' search.status.key) + ) ) - ) - - (t (concat "components.consul.service-instance.search-bar." search.status.key ".options." search.status.value) - default=(array - (concat "common.search." search.status.value) - (concat "common.consul." search.status.value) - (concat "common.brand." search.status.value) + (t + (concat + 'components.consul.service-instance.search-bar.' + search.status.key + '.options.' + search.status.value + ) + default=(array + (concat 'common.search.' search.status.value) + (concat 'common.consul.' search.status.value) + (concat 'common.brand.' search.status.value) + ) ) - ) - -as |key value|}} - + as |key value| + }} +
{{key}}
{{value}}
-{{/let}} + {{/let}} - - <:search as |search|> - -{{#if @filter.searchproperty}} + + <:search as |search|> + + {{#if @filter.searchproperty}} - + as |components| + > + - {{t "common.search.searchproperty"}} + {{t 'common.search.searchproperty'}} - - {{#let components.Optgroup components.Option as |Optgroup Option|}} - {{#each @filter.searchproperty.default as |prop|}} - - {{/each}} - {{/let}} + + {{#let components.Option as |Option|}} + {{#each @filter.searchproperty.default as |prop|}} + + {{/each}} + {{/let}} - {{/if}} - - - <:filter as |search|> + {{/if}} + + + <:filter as |search|> + + + + {{t 'common.consul.status'}} + + + + {{#let components.Optgroup components.Option as |Optgroup Option|}} + {{#each (array 'passing' 'warning' 'critical' 'empty') as |state|}} + + {{/each}} + {{/let}} + + + {{#if (gt @sources.length 0)}} - - - {{t "common.consul.status"}} - - - - {{#let components.Optgroup components.Option as |Optgroup Option|}} - {{#each (array "passing" "warning" "critical" "empty") as |state|}} - - {{/each}} - {{/let}} - - - {{#if (gt @sources.length 0)}} - - - - {{t "common.search.source"}} - - - - {{#let components.Optgroup components.Option as |Optgroup Option|}} - {{#each @sources as |source|}} - - {{/each}} - {{/let}} - + as |components| + > + - {{/if}} - - <:sort as |search|> - - - - {{#let (from-entries (array - (array "Name:asc" (t "common.sort.alpha.asc")) - (array "Name:desc" (t "common.sort.alpha.desc")) - (array "Status:asc" (t "common.sort.status.asc")) - (array "Status:desc" (t "common.sort.status.desc")) - )) - as |selectable| - }} - {{get selectable @sort.value}} - {{/let}} - - - -{{#let components.Optgroup components.Option as |Optgroup Option|}} - - - - - - - - -{{/let}} - - - + {{/if}} + + <:sort as |search|> + + + + {{#let + (from-entries + (array + (array 'Name:asc' (t 'common.sort.alpha.asc')) + (array 'Name:desc' (t 'common.sort.alpha.desc')) + (array 'Status:asc' (t 'common.sort.status.asc')) + (array 'Status:desc' (t 'common.sort.status.desc')) + ) + ) + as |selectable| + }} + {{get selectable @sort.value}} + {{/let}} + + + + {{#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 c88651b5eb..5c76cf501c 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 @@ -126,33 +126,11 @@ @multiple={{true}} as |components| > - - - {{t 'common.search.source'}} - - - - {{#let components.Option as |Option|}} - {{#if (gt @sources.length 0)}} - - {{#each this.sortedSources as |source|}} - - {{/each}} - {{/if}} - {{/let}} - + {{/if}} @@ -205,4 +183,4 @@ -
\ No newline at end of file + diff --git a/ui/packages/consul-ui/app/components/consul/service/search-bar/index.js b/ui/packages/consul-ui/app/components/consul/service/search-bar/index.js index 700434c900..d4747b1855 100644 --- a/ui/packages/consul-ui/app/components/consul/service/search-bar/index.js +++ b/ui/packages/consul-ui/app/components/consul/service/search-bar/index.js @@ -11,6 +11,7 @@ export default class ConsulServiceSearchBar extends Component { get sortedSources() { const sources = this.args.sources || []; + sources.unshift(['consul']); if (sources.includes('consul-api-gateway')) { return [...sources.filter((s) => s !== 'consul-api-gateway'), 'consul-api-gateway']; diff --git a/ui/packages/consul-ui/app/components/consul/sources-select/index.hbs b/ui/packages/consul-ui/app/components/consul/sources-select/index.hbs new file mode 100644 index 0000000000..8109ef18e0 --- /dev/null +++ b/ui/packages/consul-ui/app/components/consul/sources-select/index.hbs @@ -0,0 +1,25 @@ +{{#if (gt @sources.length 0)}} + + + {{t 'common.search.source'}} + + + + {{#let @components.Option as |Option|}} + {{#each @sources as |source|}} + {{#let (icon-mapping source) as |flightIcon|}} + + {{/let}} + {{/each}} + {{/let}} + +{{/if}} From 59936ae661b3ed40aee73e837d606da3684bf64a Mon Sep 17 00:00:00 2001 From: wenincode Date: Tue, 25 Oct 2022 11:44:27 -0600 Subject: [PATCH 04/16] Set the color to black for vault --- .../consul/external-source/index.hbs | 2 +- .../consul/external-source/index.scss | 27 ------------------- .../consul-ui/app/components/pill/index.scss | 7 ----- 3 files changed, 1 insertion(+), 35 deletions(-) diff --git a/ui/packages/consul-ui/app/components/consul/external-source/index.hbs b/ui/packages/consul-ui/app/components/consul/external-source/index.hbs index 86742d4314..19d33a8ab6 100644 --- a/ui/packages/consul-ui/app/components/consul/external-source/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/external-source/index.hbs @@ -36,7 +36,7 @@ class="consul-external-source" ...attributes > - + {{#if @label}} {{@label}} {{else}} diff --git a/ui/packages/consul-ui/app/components/consul/external-source/index.scss b/ui/packages/consul-ui/app/components/consul/external-source/index.scss index 98c8d76f3d..b79530dfeb 100644 --- a/ui/packages/consul-ui/app/components/consul/external-source/index.scss +++ b/ui/packages/consul-ui/app/components/consul/external-source/index.scss @@ -2,37 +2,10 @@ @extend %pill-200, %frame-gray-600, %p1; } -.consul-external-source > svg { - color: rgb(var(--black)); -} - .consul-external-source::before { --icon-size: icon-300; } -// .consul-external-source.kubernetes::before { -// @extend %with-logo-kubernetes-color-icon, %as-pseudo; -// } -// .consul-external-source.terraform::before { -// @extend %with-logo-terraform-color-icon, %as-pseudo; -// } -// .consul-external-source.nomad::before { -// @extend %with-logo-nomad-color-icon, %as-pseudo; -// } -// .consul-external-source.consul::before, -// .consul-external-source.consul-api-gateway::before { -// @extend %with-logo-consul-color-icon, %as-pseudo; -// } -// .consul-external-source.vault::before { -// @extend %with-vault-300; -// } -// .consul-external-source.lambda::before, -// .consul-external-source.aws::before { -// @extend %with-aws-300; -// } -// .consul-external-source.leader::before { -// @extend %with-star-outline-mask, %as-pseudo; -// } .consul-external-source.jwt::before { @extend %with-logo-jwt-color-icon, %as-pseudo; } diff --git a/ui/packages/consul-ui/app/components/pill/index.scss b/ui/packages/consul-ui/app/components/pill/index.scss index 9beab83163..242924aa59 100644 --- a/ui/packages/consul-ui/app/components/pill/index.scss +++ b/ui/packages/consul-ui/app/components/pill/index.scss @@ -30,10 +30,3 @@ span.policy-service-identity::before { %pill.oidc::before { @extend %with-logo-oidc-color-icon, %as-pseudo; } -// %pill.kubernetes::before { -// @extend %with-logo-kubernetes-color-icon, %as-pseudo; -// } -// %pill.aws-iam::before { -// --icon-name: icon-aws-color; -// content: ''; -// } From 64904d35dab35d5221b63dc95e2c93b374440913 Mon Sep 17 00:00:00 2001 From: wenincode Date: Tue, 25 Oct 2022 11:55:09 -0600 Subject: [PATCH 05/16] Format auth method search bar template --- .../consul/auth-method/search-bar/index.hbs | 289 ++++++++++-------- 1 file changed, 159 insertions(+), 130 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 be122a1d83..a400881bb5 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 @@ -1,148 +1,177 @@ - - <:status as |search|> + + <:status as |search|> -{{#let - - (t (concat "components.consul.auth-method.search-bar." search.status.key ".name") - default=(array - (concat "common.search." search.status.key) - (concat "common.consul." search.status.key) + {{#let + (t + (concat 'components.consul.auth-method.search-bar.' search.status.key '.name') + default=(array + (concat 'common.search.' search.status.key) (concat 'common.consul.' search.status.key) + ) ) - ) - - (t (concat "components.consul.auth-method.search-bar." search.status.key ".options." search.status.value) - default=(array - (concat "common.search." search.status.value) - (concat "common.consul." search.status.value) - (concat "common.brand." search.status.value) + (t + (concat + 'components.consul.auth-method.search-bar.' + search.status.key + '.options.' + search.status.value + ) + default=(array + (concat 'common.search.' search.status.value) + (concat 'common.consul.' search.status.value) + (concat 'common.brand.' search.status.value) + ) ) - ) - -as |key value|}} - + as |key value| + }} +
{{key}}
{{value}}
-{{/let}} + {{/let}} - - <:search as |search|> - + <:search as |search|> + + - - - - {{t "common.search.searchproperty"}} - - - - {{#let components.Optgroup components.Option as |Optgroup Option|}} + + + {{t 'common.search.searchproperty'}} + + + + {{#let components.Optgroup components.Option as |Optgroup Option|}} {{#each @filter.searchproperty.default as |prop|}} {{/each}} - {{/let}} - - - - - <:filter as |search|> - - - - {{t "components.consul.auth-method.search-bar.kind.name"}} - + {{/let}} - + + + + <:filter as |search|> + + + + {{t 'components.consul.auth-method.search-bar.kind.name'}} + + + {{#let components.Optgroup components.Option as |Optgroup Option|}} - - - {{#if (env 'CONSUL_SSO_ENABLED')}} - - {{/if}} + + + {{#if (env 'CONSUL_SSO_ENABLED')}} + + {{/if}} {{/let}} - - - - - - {{t "components.consul.auth-method.search-bar.locality.name"}} - - - - {{#let components.Optgroup components.Option as |Optgroup Option|}} - {{#each (array "local" "global") as |option|}} - - {{/each}} - {{/let}} - - - - <:sort as |search|> - - - - {{#let (from-entries (array - (array "MethodName:asc" (t "common.sort.alpha.asc")) - (array "MethodName:desc" (t "common.sort.alpha.desc")) - (array "TokenTTL:desc" (t "common.sort.duration.asc")) - (array "TokenTTL:asc" (t "common.sort.duration.desc")) - )) - as |selectable| - }} - {{get selectable @sort.value}} - {{/let}} - - - - {{#let components.Optgroup components.Option as |Optgroup Option|}} - - - - - - - - - {{/let}} - - - + + + + + + {{t 'components.consul.auth-method.search-bar.locality.name'}} + + + + {{#let components.Optgroup components.Option as |Optgroup Option|}} + {{#each (array 'local' 'global') as |option|}} + + {{/each}} + {{/let}} + + + + <:sort as |search|> + + + + {{#let + (from-entries + (array + (array 'MethodName:asc' (t 'common.sort.alpha.asc')) + (array 'MethodName:desc' (t 'common.sort.alpha.desc')) + (array 'TokenTTL:desc' (t 'common.sort.duration.asc')) + (array 'TokenTTL:asc' (t 'common.sort.duration.desc')) + ) + ) + as |selectable| + }} + {{get selectable @sort.value}} + {{/let}} + + + + {{#let components.Optgroup components.Option as |Optgroup Option|}} + + + + + + + + + {{/let}} + + +
From 9eb97b29f9aaefb86f4b9d5db7775e13975a0d34 Mon Sep 17 00:00:00 2001 From: wenincode Date: Tue, 25 Oct 2022 12:01:09 -0600 Subject: [PATCH 06/16] Use FlightIcon component for k8s type select in authmethods --- .../components/consul/auth-method/search-bar/index.hbs | 9 ++++----- 1 file changed, 4 insertions(+), 5 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 a400881bb5..00238194cb 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 @@ -78,11 +78,10 @@ {{#let components.Optgroup components.Option as |Optgroup Option|}} - +