mirror of https://github.com/status-im/consul.git
67 lines
1.8 KiB
Handlebars
67 lines
1.8 KiB
Handlebars
{{#if (eq @item.Name '* (All Services)')}}
|
|
<a class="topology-metrics-card" href={{href-to 'dc.services.index'}}>
|
|
<p class="empty">
|
|
{{@item.Name}}
|
|
</p>
|
|
</a>
|
|
{{else}}
|
|
<a class="topology-metrics-card"
|
|
href={{if
|
|
(and (env 'CONSUL_NSPACES_ENABLED') (not-eq @item.Namespace @service.Namespace))
|
|
(href-to "nspace.dc.services.show.index" (concat '~' @item.Namespace) @item.Datacenter @item.Name)
|
|
(href-to "dc.services.show.index" @item.Name)
|
|
}}
|
|
data-permission={{service/intention-permissions @item}}
|
|
id="{{@item.Namespace}}{{@item.Name}}"
|
|
>
|
|
<p>
|
|
{{@item.Name}}
|
|
</p>
|
|
{{#if (eq @item.Source 'proxy-registration')}}
|
|
<TopologyMetrics::SourceType />
|
|
{{/if}}
|
|
<div class="details">
|
|
{{#if (and (env 'CONSUL_NSPACES_ENABLED') (not-eq @item.Namespace @service.Namespace))}}
|
|
<dl class="nspace">
|
|
<dt>
|
|
<Tooltip>
|
|
Namespace
|
|
</Tooltip>
|
|
</dt>
|
|
<dd>
|
|
{{@item.Namespace}}
|
|
</dd>
|
|
</dl>
|
|
{{/if}}
|
|
{{#if (eq @item.Datacenter @dc)}}
|
|
{{#let (service/health-percentage @item) as |percentage|}}
|
|
{{#if (eq percentage '')}}
|
|
<span class="empty">No health checks</span>
|
|
{{else}}
|
|
{{#if (not-eq percentage.passing 0)}}
|
|
<span class="passing">{{percentage.passing}}%</span>
|
|
{{/if}}
|
|
{{#if (not-eq percentage.warning 0)}}
|
|
<span class="warning">{{percentage.warning}}%</span>
|
|
{{/if}}
|
|
{{#if (not-eq percentage.critical 0)}}
|
|
<span class="critical">{{percentage.critical}}%</span>
|
|
{{/if}}
|
|
{{/if}}
|
|
{{/let}}
|
|
{{else}}
|
|
<dl class="health">
|
|
<dt>
|
|
<Tooltip>
|
|
We are unable to determine the health status of services in remote datacenters.
|
|
</Tooltip>
|
|
</dt>
|
|
<dd>
|
|
Health
|
|
</dd>
|
|
</dl>
|
|
{{/if}}
|
|
</div>
|
|
{{yield}}
|
|
</a>
|
|
{{/if}} |