{{on-window 'resize' (action this.calculate)}}
{{#if (gt @downstreams.length 0)}}

{{@dc}}

Only showing downstreams within the current datacenter for {{@service.Service.Service}}.
{{#each @downstreams as |downstream|}}

{{downstream.Name}}

{{#if (env 'CONSUL_NSPACES_ENABLED')}}
Namespace
{{downstream.Namespace}}
{{/if}} {{#let (service/health-percentage downstream) as |percentage|}} {{#if (not-eq percentage.passing 0)}} {{percentage.passing}}% {{/if}} {{#if (not-eq percentage.warning 0)}} {{percentage.warning}}% {{/if}} {{#if (not-eq percentage.critical 0)}} {{percentage.critical}}% {{/if}} {{/let}}
{{/each}}
{{/if}}
{{@service.Service.Service}}
{{#if @metricsHref}} Open metrics Dashboard {{else}} Configure metrics dashboard {{/if}}
{{#if (gt this.downLines.length 0)}} {{#each this.downLines as |svg| }} {{/each}} {{/if}}
{{#if (gt @upstreams.length 0)}}
{{#each-in (group-by "Datacenter" @upstreams) as |dc upstreams|}}

{{dc}}

{{#each upstreams as |upstream|}}

{{upstream.Name}}

{{#if (env 'CONSUL_NSPACES_ENABLED')}}
Namespace
{{upstream.Namespace}}
{{/if}} {{#if (eq upstream.Datacenter @dc)}} {{#let (service/health-percentage upstream) as |percentage|}} {{#if (not-eq percentage.passing 0)}} {{percentage.passing}}% {{/if}} {{#if (not-eq percentage.warning 0)}} {{percentage.warning}}% {{/if}} {{#if (not-eq percentage.critical 0)}} {{percentage.critical}}% {{/if}} {{/let}} {{else}}
We are unable to determine the health status of services in remote datacenters.
Health
{{/if}}
{{/each}}
{{/each-in}}
{{/if}}
{{#if (gt this.upLines.length 0)}} {{#each this.upLines as |svg| }} {{/each}} {{/if}}