From 727b6e966b76b036480e38b69f800f007d8e7b4b Mon Sep 17 00:00:00 2001 From: kenia Date: Mon, 12 Apr 2021 14:57:56 -0400 Subject: [PATCH] Create icon and dashed line for intention not explictly defined --- .../components/informed-action/layout.scss | 3 + .../topology-metrics/down-lines/index.hbs | 7 +++ .../topology-metrics/popover/index.hbs | 60 +++++++++++++------ .../topology-metrics/popover/index.scss | 5 ++ .../app/components/topology-metrics/skin.scss | 3 + .../helpers/service/intention-permissions.js | 3 + 6 files changed, 64 insertions(+), 17 deletions(-) diff --git a/ui/packages/consul-ui/app/components/informed-action/layout.scss b/ui/packages/consul-ui/app/components/informed-action/layout.scss index 726eb31e45..b90fc61114 100644 --- a/ui/packages/consul-ui/app/components/informed-action/layout.scss +++ b/ui/packages/consul-ui/app/components/informed-action/layout.scss @@ -2,6 +2,9 @@ & { min-width: 190px; } + &.documentation { + min-width: 270px; + } > div { padding: 1rem; } diff --git a/ui/packages/consul-ui/app/components/topology-metrics/down-lines/index.hbs b/ui/packages/consul-ui/app/components/topology-metrics/down-lines/index.hbs index 681e799a85..2d246e18a9 100644 --- a/ui/packages/consul-ui/app/components/topology-metrics/down-lines/index.hbs +++ b/ui/packages/consul-ui/app/components/topology-metrics/down-lines/index.hbs @@ -90,6 +90,13 @@ @item={{item}} @oncreate={{action @oncreate item @service}} /> + {{else if (and item.Intention.Allowed (not item.TransparentProxy) (eq item.Source 'specific-intention'))}} + {{/if}} {{/each}} diff --git a/ui/packages/consul-ui/app/components/topology-metrics/popover/index.hbs b/ui/packages/consul-ui/app/components/topology-metrics/popover/index.hbs index 3c11d0fdce..9e5d374a45 100644 --- a/ui/packages/consul-ui/app/components/topology-metrics/popover/index.hbs +++ b/ui/packages/consul-ui/app/components/topology-metrics/popover/index.hbs @@ -4,22 +4,21 @@ > {{#if (eq @type 'deny')}} - <:header>

- Connection Denied + {{t "components.consul.topology-metrics.popover.deny.header"}}

<:body>

{{#if @item.Intention.HasExact}} - Change the action of this intention to allow. + {{t "components.consul.topology-metrics.popover.deny.body.isExact"}} {{else}} - Add an intention that allows these two services to connect. + {{t "components.consul.topology-metrics.popover.deny.body.notExact"}} {{/if}}

@@ -31,9 +30,9 @@ type="button" > {{#if @item.Intention.HasExact}} - Allow + {{t "components.consul.topology-metrics.popover.deny.action.isExact"}} {{else}} - Create + {{t "components.consul.topology-metrics.popover.deny.action.notExact"}} {{/if}} @@ -48,29 +47,57 @@
- -{{else}} - +{{else if (eq @type 'notDefined')}} <:header>

- Layer 7 permissions + {{t "components.consul.topology-metrics.popover.notDefined.header"}}

<:body>

- Certain HTTP request info must be identified. + {{t "components.consul.topology-metrics.popover.notDefined.body"}}

<:actions as |Actions|> - - View + + {{t "components.consul.topology-metrics.popover.notDefined.action"}} + + + + + + +
+{{else}} + + <:header> +

+ {{t "components.consul.topology-metrics.popover.l7.header"}} +

+ + <:body> +

+ {{t "components.consul.topology-metrics.popover.l7.body"}} +

+ + <:actions as |Actions|> + + + {{t "components.consul.topology-metrics.popover.l7.action"}} @@ -84,7 +111,6 @@
- {{/if}}