From 37140b3ff18617e97a15f012aac5ee7eb3301c81 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Mon, 30 Nov 2020 18:42:59 +0000 Subject: [PATCH] ui: Move identity components (#9298) --- .../node-identity/template}/index.hbs | 4 +-- .../service-identity/template}/index.hbs | 10 +++--- .../app/components/node-identity/index.js | 5 --- .../app/components/policy-form/index.hbs | 31 ++++++++++++++----- .../app/components/policy-selector/index.hbs | 25 ++++++++++----- .../app/components/service-identity/index.js | 5 --- .../components/service-identity-test.js | 24 -------------- 7 files changed, 49 insertions(+), 55 deletions(-) rename ui/packages/consul-ui/app/components/{node-identity => consul/node-identity/template}/index.hbs (82%) rename ui/packages/consul-ui/app/components/{service-identity => consul/service-identity/template}/index.hbs (66%) delete mode 100644 ui/packages/consul-ui/app/components/node-identity/index.js delete mode 100644 ui/packages/consul-ui/app/components/service-identity/index.js delete mode 100644 ui/packages/consul-ui/tests/integration/components/service-identity-test.js diff --git a/ui/packages/consul-ui/app/components/node-identity/index.hbs b/ui/packages/consul-ui/app/components/consul/node-identity/template/index.hbs similarity index 82% rename from ui/packages/consul-ui/app/components/node-identity/index.hbs rename to ui/packages/consul-ui/app/components/consul/node-identity/template/index.hbs index e570640bee..54b3f29487 100644 --- a/ui/packages/consul-ui/app/components/node-identity/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/node-identity/template/index.hbs @@ -1,6 +1,6 @@ {{#if (env "CONSUL_NSPACES_ENABLED")}} namespace "default" { - node "{{name}}" { + node "{{@name}}" { policy = "write" } } @@ -10,7 +10,7 @@ namespace_prefix "" { } } {{else}} -node "{{name}}" { +node "{{@name}}" { policy = "write" } service_prefix "" { diff --git a/ui/packages/consul-ui/app/components/service-identity/index.hbs b/ui/packages/consul-ui/app/components/consul/service-identity/template/index.hbs similarity index 66% rename from ui/packages/consul-ui/app/components/service-identity/index.hbs rename to ui/packages/consul-ui/app/components/consul/service-identity/template/index.hbs index 597febc1b0..3a15533052 100644 --- a/ui/packages/consul-ui/app/components/service-identity/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/service-identity/template/index.hbs @@ -1,9 +1,9 @@ {{#if (env "CONSUL_NSPACES_ENABLED")}} -namespace "{{nspace}}" { - service "{{name}}" { +namespace "{{@nspace}}" { + service "{{@name}}" { policy = "write" } - service "{{name}}-sidecar-proxy" { + service "{{@name}}-sidecar-proxy" { policy = "write" } service_prefix "" { @@ -14,10 +14,10 @@ namespace "{{nspace}}" { } } {{else}} -service "{{name}}" { +service "{{@name}}" { policy = "write" } -service "{{name}}-sidecar-proxy" { +service "{{@name}}-sidecar-proxy" { policy = "write" } service_prefix "" { diff --git a/ui/packages/consul-ui/app/components/node-identity/index.js b/ui/packages/consul-ui/app/components/node-identity/index.js deleted file mode 100644 index 4798652642..0000000000 --- a/ui/packages/consul-ui/app/components/node-identity/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import Component from '@ember/component'; - -export default Component.extend({ - tagName: '', -}); diff --git a/ui/packages/consul-ui/app/components/policy-form/index.hbs b/ui/packages/consul-ui/app/components/policy-form/index.hbs index 71d130e2bb..18fab4fcee 100644 --- a/ui/packages/consul-ui/app/components/policy-form/index.hbs +++ b/ui/packages/consul-ui/app/components/policy-form/index.hbs @@ -35,15 +35,32 @@