2020-12-02 09:43:34 +00:00
|
|
|
<div
|
|
|
|
class="topology-metrics-popover {{@type}}"
|
|
|
|
...attributes
|
|
|
|
>
|
|
|
|
|
|
|
|
{{#if (eq @type 'deny')}}
|
|
|
|
<InformedAction
|
|
|
|
class="dangerous"
|
|
|
|
{{did-insert (set this 'popover')}}
|
2020-11-12 15:40:15 +00:00
|
|
|
>
|
2020-12-02 09:43:34 +00:00
|
|
|
<:header>
|
|
|
|
<h3>
|
2021-04-12 18:57:56 +00:00
|
|
|
{{t "components.consul.topology-metrics.popover.deny.header"}}
|
2020-12-02 09:43:34 +00:00
|
|
|
</h3>
|
|
|
|
</:header>
|
|
|
|
<:body>
|
|
|
|
<p>
|
2021-01-19 15:40:39 +00:00
|
|
|
{{#if @item.Intention.HasExact}}
|
2021-04-12 18:57:56 +00:00
|
|
|
{{t "components.consul.topology-metrics.popover.deny.body.isExact"}}
|
2021-01-19 15:40:39 +00:00
|
|
|
{{else}}
|
2021-04-12 18:57:56 +00:00
|
|
|
{{t "components.consul.topology-metrics.popover.deny.body.notExact"}}
|
2021-01-19 15:40:39 +00:00
|
|
|
{{/if}}
|
2020-12-02 09:43:34 +00:00
|
|
|
</p>
|
|
|
|
</:body>
|
|
|
|
<:actions as |Actions|>
|
|
|
|
<Actions.Action class="action">
|
2020-11-12 15:40:15 +00:00
|
|
|
<button
|
|
|
|
{{on "click" @oncreate}}
|
2021-01-19 15:40:39 +00:00
|
|
|
data-test-confirm
|
2020-11-12 15:40:15 +00:00
|
|
|
type="button"
|
|
|
|
>
|
2021-01-19 15:40:39 +00:00
|
|
|
{{#if @item.Intention.HasExact}}
|
2021-04-12 18:57:56 +00:00
|
|
|
{{t "components.consul.topology-metrics.popover.deny.action.isExact"}}
|
2021-01-19 15:40:39 +00:00
|
|
|
{{else}}
|
2021-04-12 18:57:56 +00:00
|
|
|
{{t "components.consul.topology-metrics.popover.deny.action.notExact"}}
|
2021-01-19 15:40:39 +00:00
|
|
|
{{/if}}
|
2020-11-12 15:40:15 +00:00
|
|
|
</button>
|
2020-12-02 09:43:34 +00:00
|
|
|
</Actions.Action>
|
|
|
|
<Actions.Action>
|
2020-11-12 15:40:15 +00:00
|
|
|
<button
|
2020-12-02 09:43:34 +00:00
|
|
|
{{on 'click' (fn (optional this.popoverController.hide))}}
|
2020-11-12 15:40:15 +00:00
|
|
|
class="cancel"
|
2020-12-14 15:28:35 +00:00
|
|
|
type="button"
|
2020-11-12 15:40:15 +00:00
|
|
|
>
|
|
|
|
Cancel
|
|
|
|
</button>
|
2020-12-02 09:43:34 +00:00
|
|
|
</Actions.Action>
|
|
|
|
</:actions>
|
|
|
|
</InformedAction>
|
2021-04-14 22:52:41 +00:00
|
|
|
{{else if (eq @type 'not-defined')}}
|
2021-04-12 18:57:56 +00:00
|
|
|
<InformedAction
|
|
|
|
class="warning documentation"
|
|
|
|
{{did-insert (set this 'popover')}}
|
|
|
|
>
|
|
|
|
<:header>
|
|
|
|
<h3>
|
2021-04-14 22:52:41 +00:00
|
|
|
{{t "components.consul.topology-metrics.popover.not-defined.header"}}
|
2021-04-12 18:57:56 +00:00
|
|
|
</h3>
|
|
|
|
</:header>
|
|
|
|
<:body>
|
|
|
|
<p>
|
2021-04-28 14:31:14 +00:00
|
|
|
{{t "components.consul.topology-metrics.popover.not-defined.body" downstream=@item.Name upstream=@service.Name }}
|
2021-04-12 18:57:56 +00:00
|
|
|
</p>
|
|
|
|
</:body>
|
|
|
|
<:actions as |Actions|>
|
|
|
|
<Actions.Action class="action">
|
|
|
|
<a href="{{env 'CONSUL_DOCS_URL'}}/connect/registration/service-registration#upstreams" rel="noopener noreferrer" target="_blank">
|
2021-04-14 22:52:41 +00:00
|
|
|
{{t "components.consul.topology-metrics.popover.not-defined.action"}}
|
2021-04-12 18:57:56 +00:00
|
|
|
</a>
|
|
|
|
</Actions.Action>
|
|
|
|
<Actions.Action>
|
|
|
|
<button
|
|
|
|
{{on 'click' (fn (optional this.popoverController.hide))}}
|
|
|
|
class="cancel"
|
|
|
|
type="button"
|
|
|
|
>
|
|
|
|
Close
|
|
|
|
</button>
|
|
|
|
</Actions.Action>
|
|
|
|
</:actions>
|
|
|
|
</InformedAction>
|
2020-12-02 09:43:34 +00:00
|
|
|
{{else}}
|
|
|
|
<InformedAction
|
|
|
|
class="info"
|
|
|
|
{{did-insert (set this 'popover')}}
|
2020-11-12 15:40:15 +00:00
|
|
|
>
|
2020-12-02 09:43:34 +00:00
|
|
|
<:header>
|
|
|
|
<h3>
|
2021-04-12 18:57:56 +00:00
|
|
|
{{t "components.consul.topology-metrics.popover.l7.header"}}
|
2020-12-02 09:43:34 +00:00
|
|
|
</h3>
|
|
|
|
</:header>
|
|
|
|
<:body>
|
|
|
|
<p>
|
2021-04-12 18:57:56 +00:00
|
|
|
{{t "components.consul.topology-metrics.popover.l7.body"}}
|
2020-12-02 09:43:34 +00:00
|
|
|
</p>
|
|
|
|
</:body>
|
|
|
|
<:actions as |Actions|>
|
|
|
|
<Actions.Action class="action">
|
2021-04-12 18:57:56 +00:00
|
|
|
<a href={{href-to 'dc.services.show.intentions.edit' (concat @item.Intention.ID)}}>
|
|
|
|
{{t "components.consul.topology-metrics.popover.l7.action"}}
|
2020-12-02 09:43:34 +00:00
|
|
|
</a>
|
|
|
|
</Actions.Action>
|
|
|
|
<Actions.Action>
|
2020-11-12 15:40:15 +00:00
|
|
|
<button
|
2020-12-02 09:43:34 +00:00
|
|
|
{{on 'click' (fn (optional this.popoverController.hide))}}
|
|
|
|
class="cancel"
|
2020-12-14 15:28:35 +00:00
|
|
|
type="button"
|
2020-11-12 15:40:15 +00:00
|
|
|
>
|
|
|
|
Close
|
|
|
|
</button>
|
2020-12-02 09:43:34 +00:00
|
|
|
</Actions.Action>
|
|
|
|
</:actions>
|
|
|
|
</InformedAction>
|
2020-11-12 15:40:15 +00:00
|
|
|
{{/if}}
|
2020-12-02 09:43:34 +00:00
|
|
|
<button
|
|
|
|
{{with-overlay
|
|
|
|
this.popover
|
|
|
|
options=(hash
|
|
|
|
theme="square-tail"
|
|
|
|
placement="bottom-start"
|
|
|
|
)
|
|
|
|
returns=(set this 'popoverController')
|
|
|
|
}}
|
|
|
|
{{on 'click' (fn (optional this.popoverController.show))}}
|
2021-02-19 16:42:16 +00:00
|
|
|
{{disabled (cannot 'update intention' item=item.Intention)}}
|
2021-01-19 15:40:39 +00:00
|
|
|
type="button"
|
2020-12-02 09:43:34 +00:00
|
|
|
style={{{concat 'top:' @position.y 'px;left:' @position.x 'px;'}}}
|
2021-01-05 10:05:59 +00:00
|
|
|
aria-label={{if (eq @type 'deny') 'Add intention' 'View intention'}}
|
2021-01-19 15:40:39 +00:00
|
|
|
data-test-action
|
2020-12-02 09:43:34 +00:00
|
|
|
>
|
|
|
|
</button>
|
2020-11-12 15:40:15 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|