696aeb7840
* ui: Styling fixes (#7885) * Move cellHeight to ListCollection js file * Fix composite row border-top-color onHover state * Add empty health check icon to CompositeRow styling * ui: Slightly refactor %composite-rows and reuse ConsulServiceList component (#7886) * ui: Move individual component types into a single %composite-list plus 1. Removes all out separate CSS components (that match HTML components) to favour not having those separate for the moemnt at least 2. Reuses <ConsulServiceList /> component for Terminating Gateways > Linked Services * ui: Tweak breadcrumb spacing for '/' separator * Fix up the tests i.e. services per tab so we can call them all services * ui: Misc discovery chain fixes (#7892) 1. Look for a default splitter before looking for a default resolver in order to route to. 2. Delay adding svg listeners until afterRender (fixes split tooltip) 3. Make router id's consistent for highlighting default routers in when clicking the graph * ui: If an error occurs on the server, surface it in the notification (#7893) * ui: Delete old unused CSS (#7909) This commit deletes CSS that we no longer use and we definitely will not ever use. We also dedup all of our imports here as it turns out SASS doesn't dedupe imports. Strangely this increases out CSS weight by ~1kb instead of reducing but we'd rather keep things deduped as that was the intention * ui: Redesign - Exposed Paths (#7912) * Add new exposed paths icons to codebase * Redesign Exposed Paths and create copy-button hover on Composite Row * Refactor FeedbackDialog and CopyButton * Change this.element to use `{{ref }}` now we don't have an element We changed this to a tagless component with an eye to moving this to a glimmer component, without spotting that this would also remove the `this.element` property. This adds an equivalent using the ref modifier. Co-authored-by: John Cowen <jcowen@hashicorp.com> * ui: Remove box-shadow and pointer cursor from metada list hover effect (#7914) Co-authored-by: Kenia <19161242+kaxcode@users.noreply.github.com>
142 lines
4.5 KiB
Handlebars
142 lines
4.5 KiB
Handlebars
{{#if isDisplayed }}
|
|
<style>
|
|
{{#if selected.nodes }}
|
|
{{selected.nodes}} {
|
|
opacity: 1 !important;
|
|
|
|
background-color: var(--white);
|
|
border: var(--decor-border-100);
|
|
border-radius: var(--decor-radius-200);
|
|
border-color: var(--gray-500);
|
|
box-shadow: var(--decor-elevation-600);
|
|
}
|
|
{{/if}}
|
|
{{#if selected.edges }}
|
|
{{selected.edges}} {
|
|
opacity: 1;
|
|
}
|
|
{{/if}}
|
|
</style>
|
|
<div class="routes">
|
|
<header>
|
|
<h2>
|
|
{{chain.ServiceName}} Router
|
|
<span>
|
|
<em role="tooltip">Use routers to intercept traffic using L7 criteria such as path prefixes or http headers.</em>
|
|
</span>
|
|
</h2>
|
|
</header>
|
|
<div role="group">
|
|
{{#each routes as |item|}}
|
|
<RouteCard @item={{item}} @onclick={{action "click"}} />
|
|
{{/each}}
|
|
</div>
|
|
</div>
|
|
<div class="splitters">
|
|
<header>
|
|
<h2>
|
|
Splitters
|
|
<span>
|
|
<em role="tooltip">Splitters are configured to split incoming requests across different services or subsets of a single service.</em>
|
|
</span>
|
|
</h2>
|
|
</header>
|
|
<div role="group">
|
|
{{#each (sort-by 'Name' splitters) as |item|}}
|
|
<SplitterCard @item={{item}} @onclick={{action "click"}} />
|
|
{{/each}}
|
|
</div>
|
|
</div>
|
|
<div class="resolvers">
|
|
<header>
|
|
<h2>
|
|
Resolvers
|
|
<span>
|
|
<em role="tooltip">Resolvers are used to define which instances of a service should satisfy discovery requests.</em>
|
|
</span>
|
|
</h2>
|
|
</header>
|
|
<div role="group">
|
|
{{#each (sort-by 'Name' resolvers) as |item|}}
|
|
<ResolverCard @item={{item}} @onclick={{action "click"}} />
|
|
{{/each}}
|
|
</div>
|
|
</div>
|
|
<svg width="100%" height="100%" viewBox={{concat '0 0 ' width ' ' height}} preserveAspectRatio="none">
|
|
{{#each routes as |item|}}
|
|
{{#let (dom-position (concat '#' item.ID)) as |src|}}
|
|
{{#let (dom-position (concat '#' item.NextNode)) as |destRect|}}
|
|
{{#let (tween-to (hash
|
|
x=destRect.x
|
|
y=(add destRect.y (div destRect.height 2))
|
|
) (concat item.ID)) as |dest|}}
|
|
<path
|
|
id={{concat item.ID '>' item.NextNode}}
|
|
d={{
|
|
svg-curve (hash
|
|
x=dest.x
|
|
y=dest.y
|
|
) src=(hash
|
|
x=(add src.x src.width)
|
|
y=(add src.y (div src.height 2))
|
|
)}} />
|
|
{{/let}}
|
|
{{/let}}
|
|
{{/let}}
|
|
{{/each}}
|
|
{{#each splitters as |splitter|}}
|
|
{{#let (dom-position (concat '#' splitter.ID)) as |src|}}
|
|
{{#each splitter.Splits as |item index|}}
|
|
{{#let (dom-position (concat '#' item.NextNode)) as |destRect|}}
|
|
{{#let (tween-to (hash
|
|
x=destRect.x
|
|
y=(add destRect.y (div destRect.height 2))
|
|
) (concat splitter.ID '-' index)) as |dest|}}
|
|
<path
|
|
id={{concat 'splitter:' splitter.Name '>' item.NextNode}}
|
|
class="split"
|
|
data-percentage={{or item.Weight 0}}
|
|
d={{
|
|
svg-curve (hash
|
|
x=dest.x
|
|
y=dest.y
|
|
) src=(hash
|
|
x=(add src.x src.width)
|
|
y=(add src.y (div src.height 2))
|
|
)}} />
|
|
{{/let}}
|
|
{{/let}}
|
|
{{/each}}
|
|
{{/let}}
|
|
{{/each}}
|
|
</svg>
|
|
<svg class="resolver-inlets" viewBox={{concat '0 0 10 ' height}}>
|
|
{{#each routes as |item|}}
|
|
{{#if (starts-with 'resolver:' item.NextNode) }}
|
|
{{#let (dom-position (concat '#' item.NextNode)) as |dest|}}
|
|
<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|}}
|
|
{{#let (dom-position (concat '#' item.NextNode)) as |dest|}}
|
|
<circle r="2.5" cx="5" cy={{add dest.y (div dest.height 2)}} />
|
|
{{/let}}
|
|
{{/each}}
|
|
{{/each}}
|
|
</svg>
|
|
<svg class="splitter-inlets" viewBox={{concat '0 0 10 ' height}}>
|
|
{{#each routes as |item|}}
|
|
{{#if (starts-with 'splitter:' item.NextNode) }}
|
|
{{#let (dom-position (concat '#' item.NextNode)) as |dest|}}
|
|
<circle r="2.5" cx="5" cy={{add dest.y (div dest.height 2)}} />
|
|
{{/let}}
|
|
{{/if}}
|
|
{{/each}}
|
|
</svg>
|
|
<div class={{concat 'tooltip' (if activeTooltip ' active' '')}} style={{{ concat 'position: absolute;top:' y 'px;left:' x 'px;'}}}>
|
|
<span role="tooltip">{{round tooltip decimals=2}}%</span>
|
|
</div>
|
|
{{/if}}
|