2020-01-28 14:25:52 +00:00
{{ title item .ID }}
2019-02-21 13:10:53 +00:00
{{ # app-view class = "instance show" }}
2020-01-15 09:15:54 +00:00
{{ # block-slot name = 'notification' as | status type | }}
2019-03-22 17:24:40 +00:00
{{ partial 'dc/services/notifications' }}
{{ / block-slot }}
2020-01-15 09:15:54 +00:00
{{ # block-slot name = 'breadcrumbs' }}
2019-02-21 13:10:53 +00:00
<ol>
<li><a data-test-back href= {{ href-to 'dc.services' }} >All Services</a></li>
<li><a data-test-back href= {{ href-to 'dc.services.show' }} >Service ( {{ item .Service }} )</a></li>
<li><strong>Instance</strong></li>
</ol>
{{ / block-slot }}
2020-01-15 09:15:54 +00:00
{{ # block-slot name = 'header' }}
2019-02-21 13:10:53 +00:00
<h1>
{{ item .ID }}
{{ # with ( service / external-source item ) as | externalSource | }}
{{ # with ( css-var ( concat '--' externalSource '-color-svg' ) 'none' ) as | bg | }}
{{ # if ( not-eq bg 'none' ) }}
<span data-test-external-source=" {{ externalSource }} " style= {{{ concat 'background-image:' bg }}} data-tooltip="Registered via {{ externalSource }} ">Registered via {{ externalSource }} </span>
{{ / if }}
{{ / with }}
{{ / with }}
2019-03-22 17:01:10 +00:00
{{ # if ( eq item .Kind 'connect-proxy' ) }}
<span class="kind-proxy">Proxy</span>
2019-07-05 08:07:25 +00:00
{{ else if ( eq item .Kind 'mesh-gateway' ) }}
<span class="kind-proxy">Mesh Gateway</span>
2019-03-22 17:01:10 +00:00
{{ / if }}
2019-02-21 13:10:53 +00:00
</h1>
<dl>
<dt>Service Name</dt>
<dd><a href=" {{ href-to 'dc.services.show' item .Service }} "> {{ item .Service }} </a></dd>
</dl>
<dl>
<dt>Node Name</dt>
<dd><a href=" {{ href-to 'dc.nodes.show' item .Node .Node }} "> {{ item .Node .Node }} </a></dd>
</dl>
2019-03-22 17:24:40 +00:00
{{ # if proxy .ServiceName }}
2019-02-21 13:10:53 +00:00
<dl>
2019-06-20 08:37:17 +00:00
{{ # if proxy .ServiceProxy .DestinationServiceID }}
<dt data-test-proxy-type="sidecar-proxy">Sidecar Proxy</dt>
<dd><a href=" {{ href-to 'dc.services.instance' proxy .ServiceName proxy .Node proxy .ServiceID }} "> {{ proxy .ServiceID }} </a></dd>
{{ else }}
<dt data-test-proxy-type="proxy">Proxy</dt>
<dd><a href=" {{ href-to 'dc.services.show' proxy .ServiceName }} "> {{ proxy .ServiceName }} </a></dd>
{{ / if }}
2019-02-21 13:10:53 +00:00
</dl>
{{ / if }}
{{ # if ( eq item .Kind 'connect-proxy' ) }}
2019-03-07 10:51:39 +00:00
{{ # if item .Proxy .DestinationServiceID }}
2019-02-21 13:10:53 +00:00
<dl>
2019-03-07 10:51:39 +00:00
<dt data-test-proxy-destination="instance">Dest. Service Instance</dt>
2019-06-20 08:37:17 +00:00
<dd><a href=" {{ href-to 'dc.services.instance' item .Proxy .DestinationServiceName item .Node .Node item .Proxy .DestinationServiceID }} "> {{ item .Proxy .DestinationServiceID }} </a></dd>
2019-02-21 13:10:53 +00:00
</dl>
<dl>
<dt>Local Service Address</dt>
<dd> {{ item .Proxy .LocalServiceAddress }} : {{ item .Proxy .LocalServicePort }} </dd>
</dl>
2019-03-07 10:51:39 +00:00
{{ else }}
<dl>
<dt data-test-proxy-destination="service">Dest. Service</dt>
<dd><a href=" {{ href-to 'dc.services.show' item .Proxy .DestinationServiceName }} "> {{ item .Proxy .DestinationServiceName }} </a></dd>
</dl>
{{ / if }}
2019-02-21 13:10:53 +00:00
{{ / if }}
{{ / block-slot }}
2020-01-15 09:15:54 +00:00
{{ # block-slot name = 'content' }}
2019-02-21 13:10:53 +00:00
{{ tab-nav
items=(compact
(array
2019-07-05 08:07:25 +00:00
'Service Checks'
'Node Checks'
(if
(eq item.Kind 'connect-proxy')
'Upstreams' ''
)
2019-11-25 18:45:10 +00:00
(if
(and (eq item.Kind 'connect-proxy') (gt item.Proxy.Expose.Paths.length 0))
'Exposed Paths' ''
)
2019-07-05 08:07:25 +00:00
(if
(eq item.Kind 'mesh-gateway')
'Addresses' ''
)
'Tags'
2019-08-02 11:53:52 +00:00
'Meta Data'
2019-02-21 13:10:53 +00:00
)
)
selected=selectedTab
}}
2020-03-31 13:58:59 +00:00
2019-02-21 13:10:53 +00:00
{{ # each
(compact
(array
2019-07-05 08:07:25 +00:00
(hash id=(slugify 'Service Checks') partial='dc/services/servicechecks')
(hash id=(slugify 'Node Checks') partial='dc/services/nodechecks')
(if
(eq item.Kind 'connect-proxy')
(hash id=(slugify 'Upstreams') partial='dc/services/upstreams') ''
)
2019-11-25 18:45:10 +00:00
(if
(and (eq item.Kind 'connect-proxy') (gt item.Proxy.Expose.Paths.length 0))
(hash id=(slugify 'Exposed Paths') partial='dc/services/exposedpaths') ''
)
2019-07-05 08:07:25 +00:00
(if
(eq item.Kind 'mesh-gateway')
(hash id=(slugify 'Addresses') partial='dc/services/addresses') ''
)
(hash id=(slugify 'Tags') partial='dc/services/tags')
2019-08-02 11:53:52 +00:00
(hash id=(slugify 'Meta Data') partial='dc/services/metadata')
2019-02-21 13:10:53 +00:00
)
2020-03-31 13:58:59 +00:00
) key="id" as |panel|
2019-02-21 13:10:53 +00:00
}}
{{ # tab-section id = panel .id selected = ( eq ( if selectedTab selectedTab '' ) panel .id ) onchange = ( action "change" ) }}
{{ partial panel .partial }}
{{ / tab-section }}
{{ / each }}
{{ / block-slot }}
{{ / app-view }}