2020-10-08 15:52:09 +00:00
|
|
|
{{#if (gt @lines.length 0)}}
|
|
|
|
<svg
|
|
|
|
{{did-insert this.getIconPositions}}
|
|
|
|
{{did-update this.getIconPositions @lines}}
|
|
|
|
viewBox={{concat @center.x ' ' @view.y ' ' @view.width ' ' @view.height}}
|
|
|
|
preserveAspectRatio="none"
|
|
|
|
>
|
|
|
|
<defs>
|
2021-01-05 10:05:59 +00:00
|
|
|
<marker
|
|
|
|
id={{concat this.guid '-allow-dot'}}
|
|
|
|
class="allow-dot"
|
|
|
|
viewBox="-2 -2 15 15"
|
|
|
|
refX="6"
|
|
|
|
refY="6"
|
|
|
|
markerWidth="6"
|
|
|
|
markerHeight="6"
|
|
|
|
>
|
2020-10-08 15:52:09 +00:00
|
|
|
<circle
|
|
|
|
cx="6"
|
|
|
|
cy="6"
|
|
|
|
r="6"
|
|
|
|
/>
|
|
|
|
</marker>
|
2021-01-05 10:05:59 +00:00
|
|
|
<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"
|
|
|
|
>
|
2020-10-08 15:52:09 +00:00
|
|
|
<polygon points="0 0 10 5 0 10" />
|
|
|
|
</marker>
|
2021-01-05 10:05:59 +00:00
|
|
|
<marker
|
|
|
|
id={{concat this.guid '-deny-dot'}}
|
|
|
|
class="deny-dot"
|
|
|
|
viewBox="-2 -2 15 15"
|
|
|
|
refX="6"
|
|
|
|
refY="6"
|
|
|
|
markerWidth="6"
|
|
|
|
markerHeight="6"
|
|
|
|
>
|
2020-10-08 15:52:09 +00:00
|
|
|
<circle
|
|
|
|
cx="6"
|
|
|
|
cy="6"
|
|
|
|
r="6"
|
|
|
|
/>
|
|
|
|
</marker>
|
2021-01-05 10:05:59 +00:00
|
|
|
<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"
|
|
|
|
>
|
2020-10-08 15:52:09 +00:00
|
|
|
<polygon points="0 0 10 5 0 10" />
|
|
|
|
</marker>
|
|
|
|
</defs>
|
|
|
|
{{#each @lines as |line|}}
|
|
|
|
{{#if (eq line.permission 'deny')}}
|
|
|
|
<path
|
2021-01-05 10:05:59 +00:00
|
|
|
id={{concat this.guid line.id}}
|
2020-10-08 15:52:09 +00:00
|
|
|
d={{svg-curve line.dest src=line.src}}
|
2021-01-05 10:05:59 +00:00
|
|
|
marker-start={{concat 'url(#' this.guid '-deny-dot)'}}
|
|
|
|
marker-end={{concat 'url(#' this.guid '-deny-arrow)'}}
|
2020-10-08 15:52:09 +00:00
|
|
|
data-permission={{line.permission}}
|
|
|
|
/>
|
|
|
|
{{else}}
|
|
|
|
<path
|
2021-01-05 10:05:59 +00:00
|
|
|
id={{concat this.guid line.id}}
|
2020-10-08 15:52:09 +00:00
|
|
|
d={{svg-curve line.dest src=line.src}}
|
2021-01-05 10:05:59 +00:00
|
|
|
marker-start={{concat 'url(#' this.guid '-allow-dot)'}}
|
|
|
|
marker-end={{concat 'url(#' this.guid '-allow-arrow)'}}
|
2020-10-08 15:52:09 +00:00
|
|
|
data-permission={{line.permission}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
{{/each}}
|
|
|
|
</svg>
|
|
|
|
{{/if}}
|
|
|
|
|
2020-11-12 15:40:15 +00:00
|
|
|
{{#each @items as |item|}}
|
2020-12-02 09:43:34 +00:00
|
|
|
{{#if (or (not item.Intention.Allowed) item.Intention.HasPermissions)}}
|
|
|
|
<TopologyMetrics::Popover
|
|
|
|
@type={{if item.Intention.HasPermissions 'l7' 'deny'}}
|
2021-01-05 10:05:59 +00:00
|
|
|
@position={{find-by 'id' (concat this.guid item.Namespace item.Name) this.iconPositions}}
|
2020-12-02 09:43:34 +00:00
|
|
|
@item={{item}}
|
|
|
|
@oncreate={{action @oncreate @service item}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
2020-11-12 15:40:15 +00:00
|
|
|
{{/each}}
|