Browse Source

ui: Show the No Dependencies message when a Topology has no streams (#9413)

Also changes the upstreams docs link
pull/9425/head
John Cowen 4 years ago committed by GitHub
parent
commit
66cc91c69a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 40
      ui/packages/consul-ui/app/templates/dc/services/show/topology.hbs

40
ui/packages/consul-ui/app/templates/dc/services/show/topology.hbs

@ -1,24 +1,7 @@
<EventSource @src={{topology}} />
<div id="topology" class="tab-section">
<div class="tab-section">
<div role="tabpanel">
{{#if topology.FilteredByACLs}}
<TopologyMetrics::Notice::LimitedAccess />
{{/if}}
{{#if topology}}
<TopologyMetrics
@nspace={{nspace}}
@dc={{dc.Name}}
@service={{items.firstObject}}
@topology={{topology}}
@metricsHref={{render-template urls.service (hash
Datacenter=dc.Name
Service=items.firstObject
)}}
@isRemoteDC={{isRemoteDC}}
@hasMetricsProvider={{hasMetricsProvider}}
@oncreate={{route-action 'createIntention'}}
/>
{{else}}
{{#if (and (eq topology.Upstreams.length 0) (eq topology.Downstreams.length 0))}}
<EmptyState>
<BlockSlot @name="header">
<h2>
@ -32,10 +15,27 @@
</BlockSlot>
<BlockSlot @name="actions">
<li class="docs-link">
<a href="{{env 'CONSUL_DOCS_URL'}}/connect/registration/service-registration#upstream-configuration-reference" rel="noopener noreferrer" target="_blank">Documentation on upstreams</a>
<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>
{{else}}
{{#if topology.FilteredByACLs}}
<TopologyMetrics::Notice::LimitedAccess />
{{/if}}
<TopologyMetrics
@nspace={{nspace}}
@dc={{dc.Name}}
@service={{items.firstObject}}
@topology={{topology}}
@metricsHref={{render-template urls.service (hash
Datacenter=dc.Name
Service=items.firstObject
)}}
@isRemoteDC={{isRemoteDC}}
@hasMetricsProvider={{hasMetricsProvider}}
@oncreate={{route-action 'createIntention'}}
/>
{{/if}}
</div>
</div>

Loading…
Cancel
Save