2021-04-06 12:40:40 +00:00
<Route
@name= {{ routeName }}
as |route|>
2021-09-15 18:50:11 +00:00
<DataLoader @src= {{
uri '/$ { partition}/$ { nspace}/$ { dc}/topology/$ { name}/$ { kind}'
(hash
partition=route.params.partition
nspace=route.params.nspace
dc=route.params.dc
name=route.params.name
kind=(or route.model.items.firstObject.Service.Kind '')
)
}} as |loader|>
<BlockSlot @name="error">
<AppError
@error= {{ loader .error }}
@login= {{ route .model .app .login .open }}
/>
</BlockSlot>
<BlockSlot @name="loaded">
{{ # let
route.params.nspace
route.model.dc
route.model.items
loader.data
as |nspace dc items topology|}}
2021-04-06 12:40:40 +00:00
<div class="tab-section">
2021-10-12 13:27:06 +00:00
{{ # if ( and ( eq topology .Upstreams .length 0 ) ( eq topology .Downstreams .length 0 ) ( not-eq dc .DefaultACLPolicy 'allow' ) ( not topology .wildcardIntention ) ) }}
2021-04-06 12:40:40 +00:00
<EmptyState>
<BlockSlot @name="header">
<h2>
No dependencies
</h2>
</BlockSlot>
<BlockSlot @name="body">
<p>
This service has neither downstreams nor upstreams, which means that no services are configured to connect with it. Add upstreams and intentions to ensure this service is connected with the rest of your service mesh.
</p>
</BlockSlot>
<BlockSlot @name="actions">
<li class="docs-link">
<a href=" {{ env 'CONSUL_DOCS_URL' }} /connect/registration/service-registration#complete-configuration-example" rel="noopener noreferrer" target="_blank">Documentation on upstreams</a>
</li>
</BlockSlot>
</EmptyState>
2021-05-25 15:02:38 +00:00
{{ else }}
2021-10-12 13:27:06 +00:00
{{ # let ( collapsible-notices topology .FilteredByACLs ( eq dc .DefaultACLPolicy 'allow' ) topology .wildcardIntention topology .notDefinedIntention ) as | collapsible | }}
<CollapsibleNotices @collapsible= {{ collapsible }} >
{{ # if topology .FilteredByACLs }}
<TopologyMetrics::Notice
data-test-notice='filtered-by-acls'
@type="info"
@for="limited-access"
@action= {{ false }}
/>
{{ / if }}
{{ # if ( eq dc .DefaultACLPolicy 'allow' ) }}
<TopologyMetrics::Notice
data-test-notice='default-allow'
@type="warning"
@for="default-allow"
@internal= {{ true }}
@action= {{ true }}
/>
{{ / if }}
{{ # if topology .wildcardIntention }}
<TopologyMetrics::Notice
data-test-notice='wildcard-intention'
@type="warning"
@for="wildcard-intention"
@internal= {{ true }}
@action= {{ true }}
/>
{{ / if }}
{{ # if topology .notDefinedIntention }}
<TopologyMetrics::Notice
data-test-notice='not-defined-intention'
@type="warning"
@for="not-defined-intention"
@link=" {{ env 'CONSUL_DOCS_URL' }} /connect/registration/service-registration#upstreams"
@internal= {{ false }}
@action= {{ true }}
/>
{{ / if }}
</CollapsibleNotices>
{{ / let }}
2021-09-15 18:50:11 +00:00
<DataSource
@src= {{ uri '/${partition}/${nspace}/${dc}/ui-config'
(hash
partition=route.params.partition
nspace=route.params.nspace
dc=route.params.dc
)
}}
as |config|>
{{ # if config .data }}
2021-04-06 12:40:40 +00:00
<TopologyMetrics
@nspace= {{ nspace }}
2021-10-12 13:27:06 +00:00
@dc= {{ dc }}
2021-04-06 12:40:40 +00:00
@service= {{ items .firstObject }}
@topology= {{ topology }}
2021-05-25 15:02:38 +00:00
2021-09-15 18:50:11 +00:00
@metricsHref= {{ render-template config .data .dashboard_url_templates .service ( hash
2021-04-06 12:40:40 +00:00
Datacenter=dc.Name
Service=items.firstObject
)}}
@isRemoteDC= {{ not dc .Local }}
2021-09-15 18:50:11 +00:00
@hasMetricsProvider= {{ gt config .data .metrics_provider .length 0 }}
2021-04-06 12:40:40 +00:00
@oncreate= {{ route-action 'createIntention' }}
/>
2020-12-17 15:26:48 +00:00
{{ / if }}
2021-09-15 18:50:11 +00:00
</DataSource>
{{ / if }}
2021-04-06 12:40:40 +00:00
</div>
2021-09-15 18:50:11 +00:00
{{ / let }}
</BlockSlot>
</DataLoader>
2021-04-06 12:40:40 +00:00
</Route>