2020-11-11 14:43:37 +00:00
|
|
|
<style>
|
|
|
|
{{#if selected.nodes }}
|
|
|
|
{{selected.nodes}} {
|
|
|
|
opacity: 1 !important;
|
|
|
|
|
2021-11-23 18:32:11 +00:00
|
|
|
background-color: var(--tone-gray-000);
|
2020-11-11 14:43:37 +00:00
|
|
|
border: var(--decor-border-100);
|
|
|
|
border-radius: var(--decor-radius-200);
|
2021-10-07 18:21:11 +00:00
|
|
|
border-color: rgb(var(--tone-gray-500));
|
2020-11-11 14:43:37 +00:00
|
|
|
box-shadow: var(--decor-elevation-600);
|
|
|
|
}
|
|
|
|
{{/if}}
|
|
|
|
{{#if selected.edges }}
|
|
|
|
{{selected.edges}} {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
{{/if}}
|
|
|
|
</style>
|
2020-12-11 09:38:33 +00:00
|
|
|
|
2020-11-11 14:43:37 +00:00
|
|
|
<div class="routes">
|
|
|
|
<header>
|
|
|
|
<h2>
|
|
|
|
{{chain.ServiceName}} Router
|
2020-11-30 16:52:13 +00:00
|
|
|
<span
|
2020-12-17 16:04:05 +00:00
|
|
|
{{tooltip 'Use routers to intercept traffic using Layer 7 criteria such as path prefixes or http headers.'}}
|
2020-11-30 16:52:13 +00:00
|
|
|
>
|
2020-11-11 14:43:37 +00:00
|
|
|
</span>
|
|
|
|
</h2>
|
|
|
|
</header>
|
|
|
|
<div role="group">
|
|
|
|
{{#each routes as |item|}}
|
|
|
|
<Consul::DiscoveryChain::RouteCard
|
2020-12-11 09:38:33 +00:00
|
|
|
{{on-resize (dom-position (set item 'rect') from=this.edges)}}
|
2020-11-11 14:43:37 +00:00
|
|
|
@item={{item}}
|
|
|
|
@onclick={{action "click"}}
|
|
|
|
/>
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-12-11 09:38:33 +00:00
|
|
|
|
2020-11-11 14:43:37 +00:00
|
|
|
<div class="splitters">
|
|
|
|
<header>
|
|
|
|
<h2>
|
|
|
|
Splitters
|
2020-11-30 16:52:13 +00:00
|
|
|
<span
|
|
|
|
{{tooltip 'Splitters are configured to split incoming requests across different services or subsets of a single service.'}}
|
|
|
|
>
|
2020-11-11 14:43:37 +00:00
|
|
|
</span>
|
|
|
|
</h2>
|
|
|
|
</header>
|
|
|
|
<div role="group">
|
|
|
|
{{#each (sort-by 'Name' splitters) as |item|}}
|
|
|
|
<Consul::DiscoveryChain::SplitterCard
|
2020-12-11 09:38:33 +00:00
|
|
|
{{on-resize (dom-position (set item 'rect') from=this.edges)}}
|
2020-11-11 14:43:37 +00:00
|
|
|
@item={{item}}
|
|
|
|
@onclick={{action "click"}}
|
|
|
|
/>
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-12-11 09:38:33 +00:00
|
|
|
|
2020-11-11 14:43:37 +00:00
|
|
|
<div class="resolvers">
|
|
|
|
<header>
|
|
|
|
<h2>
|
|
|
|
Resolvers
|
2020-12-11 09:38:33 +00:00
|
|
|
<span
|
|
|
|
{{tooltip "Resolvers are used to define which instances of a service should satisfy discovery requests."}}
|
|
|
|
>
|
2020-11-11 14:43:37 +00:00
|
|
|
</span>
|
|
|
|
</h2>
|
|
|
|
</header>
|
|
|
|
<div role="group">
|
|
|
|
{{#each (sort-by 'Name' resolvers) as |item|}}
|
|
|
|
<Consul::DiscoveryChain::ResolverCard
|
2020-12-11 09:38:33 +00:00
|
|
|
{{on-resize (dom-position (set item 'rect') from=this.edges)}}
|
2020-11-11 14:43:37 +00:00
|
|
|
@item={{item}}
|
2020-12-11 09:38:33 +00:00
|
|
|
@edges={{this.edges}}
|
2020-11-11 14:43:37 +00:00
|
|
|
@onclick={{action "click"}}
|
|
|
|
/>
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-12-11 09:38:33 +00:00
|
|
|
|
|
|
|
{{nodes}}
|
|
|
|
|
2020-11-30 16:52:13 +00:00
|
|
|
<svg class="edges"
|
2020-12-11 09:38:33 +00:00
|
|
|
{{did-insert (set this 'edges')}}
|
2020-11-30 16:52:13 +00:00
|
|
|
width="100%"
|
|
|
|
height="100%"
|
|
|
|
preserveAspectRatio="none"
|
|
|
|
>
|
2020-11-11 14:43:37 +00:00
|
|
|
{{#each routes as |item|}}
|
2020-12-11 09:38:33 +00:00
|
|
|
{{#if item.rect}}
|
|
|
|
{{#let item.rect item.NextItem.rect as |src destRect|}}
|
2020-11-11 14:43:37 +00:00
|
|
|
{{#let (tween-to (hash
|
|
|
|
x=destRect.x
|
|
|
|
y=(add destRect.y (div destRect.height 2))
|
|
|
|
) (concat item.ID)) as |dest|}}
|
2020-12-11 09:38:33 +00:00
|
|
|
|
2020-11-11 14:43:37 +00:00
|
|
|
<path
|
2020-12-11 09:38:33 +00:00
|
|
|
id={{concat item.ID '>' item.NextNode}}
|
2020-11-11 14:43:37 +00:00
|
|
|
d={{
|
|
|
|
svg-curve (hash
|
|
|
|
x=dest.x
|
2020-12-11 09:38:33 +00:00
|
|
|
y=(sub dest.y 0)
|
2020-11-11 14:43:37 +00:00
|
|
|
) src=(hash
|
2020-12-11 09:38:33 +00:00
|
|
|
x=src.right
|
2020-11-11 14:43:37 +00:00
|
|
|
y=(add src.y (div src.height 2))
|
2020-12-11 09:38:33 +00:00
|
|
|
)}}
|
|
|
|
/>
|
|
|
|
|
2020-11-11 14:43:37 +00:00
|
|
|
{{/let}}
|
2020-12-11 09:38:33 +00:00
|
|
|
{{/let}}
|
|
|
|
{{/if}}
|
2020-11-11 14:43:37 +00:00
|
|
|
{{/each}}
|
2020-12-11 09:38:33 +00:00
|
|
|
|
|
|
|
{{#each splitters as |splitter|}}
|
|
|
|
{{#if splitter.rect}}
|
|
|
|
{{#let splitter.rect as |src|}}
|
|
|
|
{{#each splitter.Splits as |item index|}}
|
|
|
|
{{#let item.NextItem.rect as |destRect|}}
|
|
|
|
{{#let (tween-to (hash
|
|
|
|
x=destRect.x
|
|
|
|
y=(add destRect.y (div destRect.height 2))
|
|
|
|
) (concat splitter.ID '-' index)) as |dest|}}
|
|
|
|
|
|
|
|
<path
|
|
|
|
{{tooltip
|
|
|
|
(concat (round (or item.Weight 0) decimals=2) '%')
|
|
|
|
options=(hash followCursor=true)
|
|
|
|
}}
|
|
|
|
id={{concat 'splitter:' splitter.Name '>' item.NextNode}}
|
|
|
|
class="split"
|
|
|
|
d={{
|
|
|
|
svg-curve (hash
|
|
|
|
x=dest.x
|
|
|
|
y=dest.y
|
|
|
|
) src=(hash
|
|
|
|
x=src.right
|
|
|
|
y=(add src.y (div src.height 2))
|
|
|
|
)}}
|
|
|
|
/>
|
|
|
|
|
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
|
|
|
{{/each}}
|
|
|
|
{{/let}}
|
|
|
|
{{/if}}
|
|
|
|
{{/each}}
|
|
|
|
|
2020-11-11 14:43:37 +00:00
|
|
|
</svg>
|
2020-12-11 09:38:33 +00:00
|
|
|
|
|
|
|
<svg class="resolver-inlets" height="100%">
|
2020-11-11 14:43:37 +00:00
|
|
|
{{#each routes as |item|}}
|
2020-11-30 17:19:44 +00:00
|
|
|
{{#if (string-starts-with item.NextNode 'resolver:') }}
|
2020-12-11 09:38:33 +00:00
|
|
|
{{#let (or item.NextItem.rect (hash y=0 height=0)) as |dest|}}
|
2020-11-11 14:43:37 +00:00
|
|
|
<circle r="2.5" cx="5" cy={{add dest.y (div dest.height 2)}} />
|
|
|
|
{{/let}}
|
|
|
|
{{/if}}
|
|
|
|
{{/each}}
|
|
|
|
{{#each splitters as |item|}}
|
|
|
|
{{#each item.Splits as |item|}}
|
2020-12-11 09:38:33 +00:00
|
|
|
{{#let (or item.NextItem.rect (hash y=0 height=0)) as |dest|}}
|
2020-11-11 14:43:37 +00:00
|
|
|
<circle r="2.5" cx="5" cy={{add dest.y (div dest.height 2)}} />
|
|
|
|
{{/let}}
|
|
|
|
{{/each}}
|
|
|
|
{{/each}}
|
|
|
|
</svg>
|
2020-12-11 09:38:33 +00:00
|
|
|
|
|
|
|
<svg class="splitter-inlets" height="100%">
|
2020-11-11 14:43:37 +00:00
|
|
|
{{#each routes as |item|}}
|
2020-11-30 17:19:44 +00:00
|
|
|
{{#if (string-starts-with item.NextNode 'splitter:') }}
|
2020-12-11 09:38:33 +00:00
|
|
|
{{#let (or item.NextItem.rect (hash y=0 height=0)) as |dest|}}
|
2020-11-11 14:43:37 +00:00
|
|
|
<circle r="2.5" cx="5" cy={{add dest.y (div dest.height 2)}} />
|
|
|
|
{{/let}}
|
|
|
|
{{/if}}
|
|
|
|
{{/each}}
|
|
|
|
</svg>
|