2023-03-14 13:18:55 +00:00
|
|
|
{{!
|
|
|
|
Copyright (c) HashiCorp, Inc.
|
2023-08-11 13:12:13 +00:00
|
|
|
SPDX-License-Identifier: BUSL-1.1
|
2023-03-14 13:18:55 +00:00
|
|
|
}}
|
|
|
|
|
2020-11-12 15:40:15 +00:00
|
|
|
<div
|
2021-02-17 18:51:48 +00:00
|
|
|
{{on-resize this.calculate}}
|
2021-01-19 15:40:39 +00:00
|
|
|
class="topology-container consul-topology-metrics"
|
2020-11-12 15:40:15 +00:00
|
|
|
>
|
2021-11-05 17:46:41 +00:00
|
|
|
{{#if (gt this.downstreams.length 0)}}
|
2021-02-17 18:51:48 +00:00
|
|
|
<div
|
|
|
|
id="downstream-container"
|
|
|
|
{{did-insert this.setHeight 'downstream-lines'}}
|
2021-11-05 17:46:41 +00:00
|
|
|
{{did-update this.setHeight 'downstream-lines' this.downstreams}}
|
2021-02-17 18:51:48 +00:00
|
|
|
>
|
2021-11-05 17:46:41 +00:00
|
|
|
{{#if (not this.emptyColumn)}}
|
2020-10-05 17:07:35 +00:00
|
|
|
<div>
|
2021-10-12 13:27:06 +00:00
|
|
|
<p>{{@dc.Name}}</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>
|
2021-11-05 17:46:41 +00:00
|
|
|
{{/if}}
|
|
|
|
{{#each this.downstreams as |item|}}
|
2020-10-09 20:31:15 +00:00
|
|
|
<TopologyMetrics::Card
|
2020-11-13 15:39:00 +00:00
|
|
|
@nspace={{@nspace}}
|
2021-10-12 13:27:06 +00:00
|
|
|
@dc={{@dc.Name}}
|
2020-11-02 18:38:43 +00:00
|
|
|
@service={{@service.Service}}
|
2020-11-13 15:39:00 +00:00
|
|
|
@item={{item}}
|
2020-12-08 15:47:55 +00:00
|
|
|
@hasMetricsProvider={{@hasMetricsProvider}}
|
2020-10-27 14:25:23 +00:00
|
|
|
@noMetricsReason={{this.noMetricsReason}}
|
2020-12-08 15:47:55 +00:00
|
|
|
>
|
2021-08-26 18:08:31 +00:00
|
|
|
{{#if (and @hasMetricsProvider this.mainNotIngressService (not-eq item.Kind 'ingress-gateway'))}}
|
|
|
|
{{!-- One of the only places in the app where it's acceptable to default to 'default' namespace --}}
|
2020-12-08 15:47:55 +00:00
|
|
|
<TopologyMetrics::Stats
|
2021-08-26 18:08:31 +00:00
|
|
|
data-test-topology-metrics-downstream-stats
|
2020-12-08 15:47:55 +00:00
|
|
|
@nspace={{or item.Namespace 'default'}}
|
2021-09-15 18:50:11 +00:00
|
|
|
@partition={{or item.Partition 'default'}}
|
2020-12-08 15:47:55 +00:00
|
|
|
@dc={{item.Datacenter}}
|
|
|
|
@endpoint='downstream-summary-for-service'
|
|
|
|
@service={{@service.Service.Service}}
|
2020-12-09 18:49:34 +00:00
|
|
|
@item={{item.Name}}
|
2020-12-08 15:47:55 +00:00
|
|
|
@noMetricsReason={{this.noMetricsReason}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
</TopologyMetrics::Card>
|
2020-11-12 15:40:15 +00:00
|
|
|
{{/each}}
|
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>
|
2021-11-10 21:54:12 +00:00
|
|
|
{{#if (not-eq @service.Service.Meta.external-source 'consul-api-gateway')}}
|
2021-08-26 18:08:31 +00:00
|
|
|
{{#if @hasMetricsProvider}}
|
2020-10-26 19:48:23 +00:00
|
|
|
<TopologyMetrics::Series
|
2020-11-19 16:03:26 +00:00
|
|
|
@nspace={{or @service.Service.Namespace 'default'}}
|
2021-09-15 18:50:11 +00:00
|
|
|
@partition={{or service.Service.Partition 'default'}}
|
2021-10-12 13:27:06 +00:00
|
|
|
@dc={{@dc.Name}}
|
2020-10-26 19:48:23 +00:00
|
|
|
@service={{@service.Service.Service}}
|
2020-10-27 14:25:23 +00:00
|
|
|
@protocol={{@topology.Protocol}}
|
|
|
|
@noMetricsReason={{this.noMetricsReason}}
|
2020-10-26 19:48:23 +00:00
|
|
|
/>
|
2021-08-26 18:08:31 +00:00
|
|
|
{{#if this.mainNotIngressService}}
|
2020-10-26 19:48:23 +00:00
|
|
|
<TopologyMetrics::Stats
|
2020-11-19 16:03:26 +00:00
|
|
|
@nspace={{or @service.Service.Namespace 'default'}}
|
2021-09-15 18:50:11 +00:00
|
|
|
@partition={{or service.Service.Partition 'default'}}
|
2021-10-12 13:27:06 +00:00
|
|
|
@dc={{@dc.Name}}
|
2020-10-26 19:48:23 +00:00
|
|
|
@endpoint='summary-for-service'
|
|
|
|
@service={{@service.Service.Service}}
|
2020-10-27 14:25:23 +00:00
|
|
|
@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}}
|
2021-11-03 16:29:50 +00:00
|
|
|
<a class="metrics-link" href={{@metricsHref}} target="_blank" rel="noopener noreferrer" data-test-metrics-anchor>Open dashboard</a>
|
2020-10-05 17:07:35 +00:00
|
|
|
{{else}}
|
2021-11-03 16:29:50 +00:00
|
|
|
<a class="config-link" href="{{env 'CONSUL_DOCS_URL'}}/connect/observability/ui-visualization" target="_blank" rel="noopener noreferrer">Configure dashboard</a>
|
2020-10-05 17:07:35 +00:00
|
|
|
{{/if}}
|
|
|
|
</div>
|
2021-11-10 21:54:12 +00:00
|
|
|
{{/if}}
|
2020-10-05 17:07:35 +00:00
|
|
|
</div>
|
|
|
|
<div id="downstream-lines">
|
2020-10-08 15:52:09 +00:00
|
|
|
<TopologyMetrics::DownLines
|
|
|
|
@type='downstream'
|
2020-11-12 15:40:15 +00:00
|
|
|
@service={{@service}}
|
2020-10-08 15:52:09 +00:00
|
|
|
@view={{this.downView}}
|
|
|
|
@center={{this.centerDimensions}}
|
|
|
|
@lines={{this.downLines}}
|
2021-11-05 17:46:41 +00:00
|
|
|
@items={{this.downstreams}}
|
2020-11-12 15:40:15 +00:00
|
|
|
@oncreate={{action @oncreate}}
|
|
|
|
/>
|
2020-10-05 17:07:35 +00:00
|
|
|
</div>
|
2021-04-13 16:17:53 +00:00
|
|
|
{{#if (gt this.upstreams.length 0)}}
|
2020-10-05 17:07:35 +00:00
|
|
|
<div id="upstream-column">
|
2022-06-23 13:16:26 +00:00
|
|
|
{{#each-in (group-by "PeerOrDatacenter" this.upstreams) as |dc upstreams|}}
|
2021-02-17 18:51:48 +00:00
|
|
|
<div
|
|
|
|
id="upstream-container"
|
|
|
|
{{did-insert this.setHeight 'upstream-lines'}}
|
2021-04-13 16:17:53 +00:00
|
|
|
{{did-update this.setHeight 'upstream-lines' this.upstreams}}
|
2021-02-17 18:51:48 +00:00
|
|
|
>
|
2021-04-13 16:17:53 +00:00
|
|
|
{{#if dc}}
|
2020-10-05 17:07:35 +00:00
|
|
|
<p>{{dc}}</p>
|
2021-04-13 16:17:53 +00:00
|
|
|
{{/if}}
|
2020-11-12 15:40:15 +00:00
|
|
|
{{#each upstreams as |item|}}
|
2020-10-09 20:31:15 +00:00
|
|
|
<TopologyMetrics::Card
|
2021-10-12 13:27:06 +00:00
|
|
|
@dc={{@dc.Name}}
|
2020-11-12 15:40:15 +00:00
|
|
|
@item={{item}}
|
2020-11-02 18:38:43 +00:00
|
|
|
@service={{@service.Service}}
|
2020-12-08 15:47:55 +00:00
|
|
|
>
|
2021-08-26 18:08:31 +00:00
|
|
|
{{#if (and @hasMetricsProvider this.mainNotIngressService (not-eq item.Kind 'ingress-gateway'))}}
|
|
|
|
{{!-- One of the only places in the app where it's acceptable to default to 'default' namespace --}}
|
2020-12-08 15:47:55 +00:00
|
|
|
<TopologyMetrics::Stats
|
|
|
|
@nspace={{or item.Namespace 'default'}}
|
2021-09-15 18:50:11 +00:00
|
|
|
@partition={{or item.Partition 'default'}}
|
2020-12-08 15:47:55 +00:00
|
|
|
@dc={{item.Datacenter}}
|
|
|
|
@endpoint='upstream-summary-for-service'
|
|
|
|
@service={{@service.Service.Service}}
|
2020-12-09 18:49:34 +00:00
|
|
|
@item={{item.Name}}
|
2020-12-08 15:47:55 +00:00
|
|
|
@noMetricsReason={{this.noMetricsReason}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
</TopologyMetrics::Card>
|
2020-11-12 15:40:15 +00:00
|
|
|
{{/each}}
|
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'
|
2020-11-12 15:40:15 +00:00
|
|
|
@service={{@service}}
|
2020-10-08 15:52:09 +00:00
|
|
|
@view={{this.upView}}
|
|
|
|
@center={{this.centerDimensions}}
|
|
|
|
@lines={{this.upLines}}
|
2021-04-13 16:17:53 +00:00
|
|
|
@items={{this.upstreams}}
|
2020-11-12 15:40:15 +00:00
|
|
|
@oncreate={{action @oncreate}}
|
|
|
|
/>
|
2020-10-05 17:07:35 +00:00
|
|
|
</div>
|
2020-11-27 15:41:13 +00:00
|
|
|
</div>
|