|
|
@ -16,6 +16,7 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="routes">
|
|
|
|
<div class="routes">
|
|
|
|
<header>
|
|
|
|
<header>
|
|
|
|
<h2>
|
|
|
|
<h2>
|
|
|
@ -29,12 +30,14 @@
|
|
|
|
<div role="group">
|
|
|
|
<div role="group">
|
|
|
|
{{#each routes as |item|}}
|
|
|
|
{{#each routes as |item|}}
|
|
|
|
<Consul::DiscoveryChain::RouteCard
|
|
|
|
<Consul::DiscoveryChain::RouteCard
|
|
|
|
|
|
|
|
{{on-resize (dom-position (set item 'rect') from=this.edges)}}
|
|
|
|
@item={{item}}
|
|
|
|
@item={{item}}
|
|
|
|
@onclick={{action "click"}}
|
|
|
|
@onclick={{action "click"}}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
{{/each}}
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="splitters">
|
|
|
|
<div class="splitters">
|
|
|
|
<header>
|
|
|
|
<header>
|
|
|
|
<h2>
|
|
|
|
<h2>
|
|
|
@ -48,66 +51,84 @@
|
|
|
|
<div role="group">
|
|
|
|
<div role="group">
|
|
|
|
{{#each (sort-by 'Name' splitters) as |item|}}
|
|
|
|
{{#each (sort-by 'Name' splitters) as |item|}}
|
|
|
|
<Consul::DiscoveryChain::SplitterCard
|
|
|
|
<Consul::DiscoveryChain::SplitterCard
|
|
|
|
|
|
|
|
{{on-resize (dom-position (set item 'rect') from=this.edges)}}
|
|
|
|
@item={{item}}
|
|
|
|
@item={{item}}
|
|
|
|
@onclick={{action "click"}}
|
|
|
|
@onclick={{action "click"}}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
{{/each}}
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="resolvers">
|
|
|
|
<div class="resolvers">
|
|
|
|
<header>
|
|
|
|
<header>
|
|
|
|
<h2>
|
|
|
|
<h2>
|
|
|
|
Resolvers
|
|
|
|
Resolvers
|
|
|
|
<span {{tooltip "Resolvers are used to define which instances of a service should satisfy discovery requests."}}>
|
|
|
|
<span
|
|
|
|
|
|
|
|
{{tooltip "Resolvers are used to define which instances of a service should satisfy discovery requests."}}
|
|
|
|
|
|
|
|
>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</h2>
|
|
|
|
</h2>
|
|
|
|
</header>
|
|
|
|
</header>
|
|
|
|
<div role="group">
|
|
|
|
<div role="group">
|
|
|
|
{{#each (sort-by 'Name' resolvers) as |item|}}
|
|
|
|
{{#each (sort-by 'Name' resolvers) as |item|}}
|
|
|
|
<Consul::DiscoveryChain::ResolverCard
|
|
|
|
<Consul::DiscoveryChain::ResolverCard
|
|
|
|
|
|
|
|
{{on-resize (dom-position (set item 'rect') from=this.edges)}}
|
|
|
|
@item={{item}}
|
|
|
|
@item={{item}}
|
|
|
|
|
|
|
|
@edges={{this.edges}}
|
|
|
|
@onclick={{action "click"}}
|
|
|
|
@onclick={{action "click"}}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
{{/each}}
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{{nodes}}
|
|
|
|
|
|
|
|
|
|
|
|
<svg class="edges"
|
|
|
|
<svg class="edges"
|
|
|
|
|
|
|
|
{{did-insert (set this 'edges')}}
|
|
|
|
width="100%"
|
|
|
|
width="100%"
|
|
|
|
height="100%"
|
|
|
|
height="100%"
|
|
|
|
viewBox={{concat '0 0 ' width ' ' height}}
|
|
|
|
|
|
|
|
preserveAspectRatio="none"
|
|
|
|
preserveAspectRatio="none"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
{{#each routes as |item|}}
|
|
|
|
{{#each routes as |item|}}
|
|
|
|
{{#let (dom-position (concat '#' item.ID) '.edges') as |src|}}
|
|
|
|
{{#if item.rect}}
|
|
|
|
{{#let (dom-position (concat '#' item.NextNode) '.edges') as |destRect|}}
|
|
|
|
{{#let item.rect item.NextItem.rect as |src destRect|}}
|
|
|
|
{{#let (tween-to (hash
|
|
|
|
{{#let (tween-to (hash
|
|
|
|
x=destRect.x
|
|
|
|
x=destRect.x
|
|
|
|
y=(add destRect.y (div destRect.height 2))
|
|
|
|
y=(add destRect.y (div destRect.height 2))
|
|
|
|
) (concat item.ID)) as |dest|}}
|
|
|
|
) (concat item.ID)) as |dest|}}
|
|
|
|
|
|
|
|
|
|
|
|
<path
|
|
|
|
<path
|
|
|
|
id={{concat item.ID '>' item.NextNode}}
|
|
|
|
id={{concat item.ID '>' item.NextNode}}
|
|
|
|
d={{
|
|
|
|
d={{
|
|
|
|
svg-curve (hash
|
|
|
|
svg-curve (hash
|
|
|
|
x=dest.x
|
|
|
|
x=dest.x
|
|
|
|
y=dest.y
|
|
|
|
y=(sub dest.y 0)
|
|
|
|
) src=(hash
|
|
|
|
) src=(hash
|
|
|
|
x=(add src.x src.width)
|
|
|
|
x=src.right
|
|
|
|
y=(add src.y (div src.height 2))
|
|
|
|
y=(add src.y (div src.height 2))
|
|
|
|
)}} />
|
|
|
|
)}}
|
|
|
|
{{/let}}
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
|
|
|
|
|
|
|
{{/if}}
|
|
|
|
{{/each}}
|
|
|
|
{{/each}}
|
|
|
|
|
|
|
|
|
|
|
|
{{#each splitters as |splitter|}}
|
|
|
|
{{#each splitters as |splitter|}}
|
|
|
|
{{#let (dom-position (concat '#' splitter.ID) '.edges') as |src|}}
|
|
|
|
{{#if splitter.rect}}
|
|
|
|
|
|
|
|
{{#let splitter.rect as |src|}}
|
|
|
|
{{#each splitter.Splits as |item index|}}
|
|
|
|
{{#each splitter.Splits as |item index|}}
|
|
|
|
{{#let (dom-position (concat '#' item.NextNode) '.edges') as |destRect|}}
|
|
|
|
{{#let item.NextItem.rect as |destRect|}}
|
|
|
|
{{#let (tween-to (hash
|
|
|
|
{{#let (tween-to (hash
|
|
|
|
x=destRect.x
|
|
|
|
x=destRect.x
|
|
|
|
y=(add destRect.y (div destRect.height 2))
|
|
|
|
y=(add destRect.y (div destRect.height 2))
|
|
|
|
) (concat splitter.ID '-' index)) as |dest|}}
|
|
|
|
) (concat splitter.ID '-' index)) as |dest|}}
|
|
|
|
|
|
|
|
|
|
|
|
<path
|
|
|
|
<path
|
|
|
|
{{tooltip (concat (round (or item.Weight 0) decimals=2) '%') options=(hash followCursor=true)}}
|
|
|
|
{{tooltip
|
|
|
|
|
|
|
|
(concat (round (or item.Weight 0) decimals=2) '%')
|
|
|
|
|
|
|
|
options=(hash followCursor=true)
|
|
|
|
|
|
|
|
}}
|
|
|
|
id={{concat 'splitter:' splitter.Name '>' item.NextNode}}
|
|
|
|
id={{concat 'splitter:' splitter.Name '>' item.NextNode}}
|
|
|
|
class="split"
|
|
|
|
class="split"
|
|
|
|
d={{
|
|
|
|
d={{
|
|
|
@ -115,35 +136,41 @@
|
|
|
|
x=dest.x
|
|
|
|
x=dest.x
|
|
|
|
y=dest.y
|
|
|
|
y=dest.y
|
|
|
|
) src=(hash
|
|
|
|
) src=(hash
|
|
|
|
x=(add src.x src.width)
|
|
|
|
x=src.right
|
|
|
|
y=(add src.y (div src.height 2))
|
|
|
|
y=(add src.y (div src.height 2))
|
|
|
|
)}} />
|
|
|
|
)}}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
|
|
|
{{/each}}
|
|
|
|
{{/each}}
|
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
|
|
|
|
|
|
|
{{/if}}
|
|
|
|
{{/each}}
|
|
|
|
{{/each}}
|
|
|
|
|
|
|
|
|
|
|
|
</svg>
|
|
|
|
</svg>
|
|
|
|
<svg class="resolver-inlets" viewBox={{concat '0 0 10 ' height}}>
|
|
|
|
|
|
|
|
|
|
|
|
<svg class="resolver-inlets" height="100%">
|
|
|
|
{{#each routes as |item|}}
|
|
|
|
{{#each routes as |item|}}
|
|
|
|
{{#if (string-starts-with item.NextNode 'resolver:') }}
|
|
|
|
{{#if (string-starts-with item.NextNode 'resolver:') }}
|
|
|
|
{{#let (dom-position (concat '#' item.NextNode) '.edges') as |dest|}}
|
|
|
|
{{#let (or item.NextItem.rect (hash y=0 height=0)) as |dest|}}
|
|
|
|
<circle r="2.5" cx="5" cy={{add dest.y (div dest.height 2)}} />
|
|
|
|
<circle r="2.5" cx="5" cy={{add dest.y (div dest.height 2)}} />
|
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|
{{/each}}
|
|
|
|
{{/each}}
|
|
|
|
{{#each splitters as |item|}}
|
|
|
|
{{#each splitters as |item|}}
|
|
|
|
{{#each item.Splits as |item|}}
|
|
|
|
{{#each item.Splits as |item|}}
|
|
|
|
{{#let (dom-position (concat '#' item.NextNode) '.edges') as |dest|}}
|
|
|
|
{{#let (or item.NextItem.rect (hash y=0 height=0)) as |dest|}}
|
|
|
|
<circle r="2.5" cx="5" cy={{add dest.y (div dest.height 2)}} />
|
|
|
|
<circle r="2.5" cx="5" cy={{add dest.y (div dest.height 2)}} />
|
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
|
|
|
{{/each}}
|
|
|
|
{{/each}}
|
|
|
|
{{/each}}
|
|
|
|
{{/each}}
|
|
|
|
</svg>
|
|
|
|
</svg>
|
|
|
|
<svg class="splitter-inlets" viewBox={{concat '0 0 10 ' height}}>
|
|
|
|
|
|
|
|
|
|
|
|
<svg class="splitter-inlets" height="100%">
|
|
|
|
{{#each routes as |item|}}
|
|
|
|
{{#each routes as |item|}}
|
|
|
|
{{#if (string-starts-with item.NextNode 'splitter:') }}
|
|
|
|
{{#if (string-starts-with item.NextNode 'splitter:') }}
|
|
|
|
{{#let (dom-position (concat '#' item.NextNode) '.edges') as |dest|}}
|
|
|
|
{{#let (or item.NextItem.rect (hash y=0 height=0)) as |dest|}}
|
|
|
|
<circle r="2.5" cx="5" cy={{add dest.y (div dest.height 2)}} />
|
|
|
|
<circle r="2.5" cx="5" cy={{add dest.y (div dest.height 2)}} />
|
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
|
|
|
{{/if}}
|
|
|
|
{{/if}}
|
|
|
|