From a42e844ccc9e56643a10b9cd76a0dffc17a08d41 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Tue, 5 Jan 2021 16:59:16 +0000 Subject: [PATCH] ui: Add EmptyState for exposed paths, plus additional details (#9445) * ui: Add EmptyState for exposed paths, plus additional details 1. Add the port to the combined address 2. Use the proxy address for the ip address used * Convert to glimmer component * Add spaces to ListenerPort and LocalPathPort Tooltips --- .../consul-ui/app/components/action/index.hbs | 30 +++++++------------ .../consul/exposed-path/list/index.hbs | 8 ++--- .../consul/exposed-path/list/index.js | 5 ---- .../dc/services/instance/exposedpaths.hbs | 10 ++++++- 4 files changed, 24 insertions(+), 29 deletions(-) delete mode 100644 ui/packages/consul-ui/app/components/consul/exposed-path/list/index.js diff --git a/ui/packages/consul-ui/app/components/action/index.hbs b/ui/packages/consul-ui/app/components/action/index.hbs index ba1f34ac1f..75484eb11a 100644 --- a/ui/packages/consul-ui/app/components/action/index.hbs +++ b/ui/packages/consul-ui/app/components/action/index.hbs @@ -1,35 +1,27 @@ -{{#if @for}} +{{#if @for~}} -{{else if @href}} - {{#if @external}} + >{{yield}} +{{~else if @href~}} + {{~#if @external~}} - {{yield}} - - {{else}} + >{{yield}} + {{~else~}} - {{yield}} - - {{/if}} -{{else}} + >{{yield}} + {{~/if~}} +{{~else~}} -{{/if}} \ No newline at end of file + >{{yield}} +{{~/if}} \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/exposed-path/list/index.hbs b/ui/packages/consul-ui/app/components/consul/exposed-path/list/index.hbs index 14fdf352b1..47740f4bfa 100644 --- a/ui/packages/consul-ui/app/components/consul/exposed-path/list/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/exposed-path/list/index.hbs @@ -8,7 +8,7 @@ {{#each @items as |path|}}
  • - {{#let (concat address ':' path.Path) as |combinedAddress|}} + {{#let (concat @address ':' path.ListenerPort path.Path) as |combinedAddress|}}

    {{combinedAddress}} @@ -37,7 +37,7 @@

    - Port + Listener Port
    @@ -49,7 +49,7 @@
    - Port + Local Path Port
    @@ -61,7 +61,7 @@
    - Path + Path
    diff --git a/ui/packages/consul-ui/app/components/consul/exposed-path/list/index.js b/ui/packages/consul-ui/app/components/consul/exposed-path/list/index.js deleted file mode 100644 index 4798652642..0000000000 --- a/ui/packages/consul-ui/app/components/consul/exposed-path/list/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/templates/dc/services/instance/exposedpaths.hbs b/ui/packages/consul-ui/app/templates/dc/services/instance/exposedpaths.hbs index 6175b9c459..9b144f04be 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 @@ -3,6 +3,14 @@

    The following list shows individual HTTP paths exposed through Envoy for external services like Prometheus. Read more about this in our documentation.

    - + +{{else}} + + +

    + There are no individual HTTP paths exposed through Envoy for external services like Prometheus. Read more about this in our documentation. +

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