2020-10-05 17:07:35 +00:00
|
|
|
{{on-window 'resize' (action this.calculate)}}
|
|
|
|
|
2020-10-27 14:25:23 +00:00
|
|
|
<div {{did-insert (action this.calculate)}} {{did-update (action this.calculate) @topology}} class="topology-container">
|
|
|
|
{{#if (gt @topology.Downstreams.length 0)}}
|
2020-10-05 17:07:35 +00:00
|
|
|
<div id="downstream-container">
|
|
|
|
<div>
|
2020-10-27 14:25:23 +00:00
|
|
|
<p>{{@topology.Datacenter}}</p>
|
2020-10-05 17:07:35 +00:00
|
|
|
<span>
|
|
|
|
<Tooltip>
|
|
|
|
Only showing downstreams within the current datacenter for {{@service.Service.Service}}.
|
|
|
|
</Tooltip>
|
|
|
|
</span>
|
|
|
|
</div>
|
2020-10-09 20:31:15 +00:00
|
|
|
<TopologyMetrics::Card
|
2020-10-27 14:25:23 +00:00
|
|
|
@items={{@topology.Downstreams}}
|
2020-11-02 18:38:43 +00:00
|
|
|
@service={{@service.Service}}
|
2020-10-27 14:25:23 +00:00
|
|
|
@dc={{@topology.Datacenter}}
|
2020-10-09 20:31:15 +00:00
|
|
|
@hasMetricsProvider={{this.hasMetricsProvider}}
|
2020-10-27 14:25:23 +00:00
|
|
|
@noMetricsReason={{this.noMetricsReason}}
|
2020-10-09 20:31:15 +00:00
|
|
|
/>
|
2020-10-05 17:07:35 +00:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
<div id="metrics-container">
|
2020-10-23 13:45:39 +00:00
|
|
|
<div class="metrics-header">
|
2020-10-05 17:07:35 +00:00
|
|
|
{{@service.Service.Service}}
|
|
|
|
</div>
|
2020-10-09 20:31:15 +00:00
|
|
|
{{#if this.hasMetricsProvider }}
|
2020-10-26 19:48:23 +00:00
|
|
|
<TopologyMetrics::Series
|
|
|
|
@service={{@service.Service.Service}}
|
2020-10-27 14:25:23 +00:00
|
|
|
@dc={{@topology.Datacenter}}
|
|
|
|
@protocol={{@topology.Protocol}}
|
|
|
|
@noMetricsReason={{this.noMetricsReason}}
|
2020-10-26 19:48:23 +00:00
|
|
|
/>
|
2020-11-02 18:38:43 +00:00
|
|
|
{{#if (not-eq @service.Service.Kind 'ingress-gateway')}}
|
2020-10-26 19:48:23 +00:00
|
|
|
<TopologyMetrics::Stats
|
|
|
|
@endpoint='summary-for-service'
|
|
|
|
@service={{@service.Service.Service}}
|
2020-10-27 14:25:23 +00:00
|
|
|
@dc={{@topology.Datacenter}}
|
|
|
|
@protocol={{@topology.Protocol}}
|
|
|
|
@noMetricsReason={{this.noMetricsReason}}
|
2020-10-26 19:48:23 +00:00
|
|
|
/>
|
2020-11-02 18:38:43 +00:00
|
|
|
{{/if}}
|
2020-10-09 20:31:15 +00:00
|
|
|
{{/if}}
|
|
|
|
<div class="link">
|
2020-10-05 17:07:35 +00:00
|
|
|
{{#if @metricsHref}}
|
2020-10-27 14:25:23 +00:00
|
|
|
<a class="metrics-link" href={{@metricsHref}} target="_blank" rel="noopener noreferrer" data-test-metrics-anchor>Open metrics Dashboard</a>
|
2020-10-05 17:07:35 +00:00
|
|
|
{{else}}
|
2020-10-23 13:44:38 +00:00
|
|
|
<a class="config-link" href="{{env 'CONSUL_DOCS_URL'}}/agent/options.html#ui_config" target="_blank" rel="noopener noreferrer">Configure metrics dashboard</a>
|
2020-10-05 17:07:35 +00:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="downstream-lines">
|
2020-10-08 15:52:09 +00:00
|
|
|
<TopologyMetrics::DownLines
|
|
|
|
@type='downstream'
|
|
|
|
@view={{this.downView}}
|
|
|
|
@center={{this.centerDimensions}}
|
|
|
|
@lines={{this.downLines}}
|
2020-10-27 14:25:23 +00:00
|
|
|
@items={{@topology.Downstreams}}
|
2020-10-08 15:52:09 +00:00
|
|
|
/>
|
2020-10-05 17:07:35 +00:00
|
|
|
</div>
|
2020-10-27 14:25:23 +00:00
|
|
|
{{#if (gt @topology.Upstreams.length 0)}}
|
2020-10-05 17:07:35 +00:00
|
|
|
<div id="upstream-column">
|
2020-10-27 14:25:23 +00:00
|
|
|
{{#each-in (group-by "Datacenter" @topology.Upstreams) as |dc upstreams|}}
|
2020-10-05 17:07:35 +00:00
|
|
|
<div id="upstream-container">
|
|
|
|
<p>{{dc}}</p>
|
2020-10-09 20:31:15 +00:00
|
|
|
<TopologyMetrics::Card
|
|
|
|
@items={{upstreams}}
|
2020-11-02 18:38:43 +00:00
|
|
|
@service={{@service.Service}}
|
2020-10-27 14:25:23 +00:00
|
|
|
@dc={{@topology.Datacenter}}
|
2020-10-09 20:31:15 +00:00
|
|
|
@type='upstream'
|
|
|
|
@hasMetricsProvider={{this.hasMetricsProvider}}
|
2020-10-27 14:25:23 +00:00
|
|
|
@noMetricsReason={{this.noMetricsReason}}
|
2020-10-09 20:31:15 +00:00
|
|
|
/>
|
2020-10-05 17:07:35 +00:00
|
|
|
</div>
|
|
|
|
{{/each-in}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
<div id="upstream-lines">
|
2020-10-08 15:52:09 +00:00
|
|
|
<TopologyMetrics::UpLines
|
|
|
|
@type='upstream'
|
|
|
|
@view={{this.upView}}
|
|
|
|
@center={{this.centerDimensions}}
|
|
|
|
@lines={{this.upLines}}
|
2020-10-27 14:25:23 +00:00
|
|
|
@items={{@topology.Upstreams}}
|
2020-10-08 15:52:09 +00:00
|
|
|
/>
|
2020-10-05 17:07:35 +00:00
|
|
|
</div>
|
|
|
|
</div>
|