mirror of
https://github.com/status-im/consul.git
synced 2025-01-29 06:55:25 +00:00
5fb9df1640
* Adding explicit MPL license for sub-package This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Adding explicit MPL license for sub-package This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Updating the license from MPL to Business Source License Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at <Blog URL>, FAQ at www.hashicorp.com/licensing-faq, and details of the license at www.hashicorp.com/bsl. * add missing license headers * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
113 lines
3.1 KiB
Handlebars
113 lines
3.1 KiB
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
}}
|
|
|
|
{{#if (gt @lines.length 0)}}
|
|
<svg
|
|
{{did-insert this.getIconPositions}}
|
|
{{did-update this.getIconPositions @lines}}
|
|
viewBox={{concat @view.x ' ' @view.y ' ' @view.width ' ' @view.height}}
|
|
preserveAspectRatio="none"
|
|
>
|
|
<defs>
|
|
<marker
|
|
id={{concat this.guid '-allow-dot'}}
|
|
class="allow-dot"
|
|
viewBox="-2 -2 15 15"
|
|
refX="6"
|
|
refY="6"
|
|
markerWidth="6"
|
|
markerHeight="6"
|
|
>
|
|
<circle
|
|
cx="6"
|
|
cy="6"
|
|
r="6"
|
|
/>
|
|
</marker>
|
|
<marker
|
|
id={{concat this.guid '-allow-arrow'}}
|
|
class="allow-arrow"
|
|
viewBox="-1 -1 12 12"
|
|
refX="5"
|
|
refY="5"
|
|
markerWidth="6" markerHeight="6"
|
|
orient="auto-start-reverse"
|
|
>
|
|
<polygon points="0 0 10 5 0 10" />
|
|
</marker>
|
|
<marker
|
|
id={{concat this.guid '-deny-dot'}}
|
|
class="deny-dot"
|
|
viewBox="-2 -2 15 15"
|
|
refX="6"
|
|
refY="6"
|
|
markerWidth="6"
|
|
markerHeight="6"
|
|
>
|
|
<circle
|
|
cx="6"
|
|
cy="6"
|
|
r="6"
|
|
/>
|
|
</marker>
|
|
<marker
|
|
id={{concat this.guid '-deny-arrow'}}
|
|
class="deny-arrow"
|
|
viewBox="-1 -1 12 12"
|
|
refX="5"
|
|
refY="5"
|
|
markerWidth="6"
|
|
markerHeight="6"
|
|
orient="auto-start-reverse"
|
|
>
|
|
<polygon points="0 0 10 5 0 10" />
|
|
</marker>
|
|
</defs>
|
|
{{#each @lines as |line|}}
|
|
{{#if (eq line.permission 'deny')}}
|
|
<path
|
|
id={{concat this.guid line.id}}
|
|
d={{svg-curve line.dest src=line.src}}
|
|
marker-start={{concat 'url(#' this.guid '-deny-dot)'}}
|
|
marker-end={{concat 'url(#' this.guid '-deny-arrow)'}}
|
|
data-permission={{line.permission}}
|
|
/>
|
|
{{else}}
|
|
<path
|
|
id={{concat this.guid line.id}}
|
|
d={{svg-curve line.dest src=line.src}}
|
|
marker-start={{concat 'url(#' this.guid '-allow-dot)'}}
|
|
marker-end={{concat 'url(#' this.guid '-allow-arrow)'}}
|
|
data-permission={{line.permission}}
|
|
/>
|
|
{{/if}}
|
|
{{/each}}
|
|
</svg>
|
|
{{/if}}
|
|
|
|
{{#let (not (can 'update intention for service' item=@service.Service)) as |disabled|}}
|
|
{{#each @items as |item|}}
|
|
{{#if (and (not-eq item.Datacenter '') (or (not item.Intention.Allowed) item.Intention.HasPermissions))}}
|
|
<TopologyMetrics::Popover
|
|
@type={{if item.Intention.HasPermissions 'l7' 'deny'}}
|
|
@position={{find-by 'id' (concat this.guid item.Namespace item.Name) this.iconPositions}}
|
|
@item={{item}}
|
|
@disabled={{disabled}}
|
|
@oncreate={{action @oncreate item @service}}
|
|
/>
|
|
{{else if (and (not-eq item.Datacenter '') item.Intention.Allowed (not item.TransparentProxy) (not item.ConnectNative) (eq item.Source 'specific-intention'))}}
|
|
<TopologyMetrics::Popover
|
|
@type='not-defined'
|
|
@service={{@service}}
|
|
@position={{find-by 'id' (concat this.guid item.Namespace item.Name) this.iconPositions}}
|
|
@item={{item}}
|
|
@disabled={{disabled}}
|
|
@oncreate={{action @oncreate item @service}}
|
|
/>
|
|
{{/if}}
|
|
{{/each}}
|
|
{{/let}}
|
|
|