mirror of
https://github.com/status-im/consul.git
synced 2025-02-16 07:38:22 +00:00
This commit includes several pieces of functionality to enable services to be removed and the page to present information that this has happened but also keep the deleted information on the page. Along with the more usual blocking query based listing. To enable this: 1. Implements `meta` on the model (only available on collections in ember) 2. Adds new `catchable` ComputedProperty alongside a `listen` helper for working with specific errors that can be thrown from EventSources in an ember-like way. Briefly, normal computed properties update when a property changes, EventSources can additionally throw errors so we can catch them and show different visuals based on that.
50 lines
1.7 KiB
Handlebars
50 lines
1.7 KiB
Handlebars
{{#app-view class="service show"}}
|
|
{{#block-slot 'notification' as |status type|}}
|
|
{{partial 'dc/services/notifications'}}
|
|
{{/block-slot}}
|
|
{{#block-slot 'breadcrumbs'}}
|
|
<ol>
|
|
<li><a data-test-back href={{href-to 'dc.services'}}>All Services</a></li>
|
|
</ol>
|
|
{{/block-slot}}
|
|
{{#block-slot 'header'}}
|
|
<h1>
|
|
{{ item.Service.Service }}
|
|
{{#with (service/external-source item.Service) 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}}
|
|
{{#if (eq item.Service.Kind 'connect-proxy')}}
|
|
<span class="kind-proxy">Proxy</span>
|
|
{{/if}}
|
|
</h1>
|
|
<label for="toolbar-toggle"></label>
|
|
{{tab-nav
|
|
items=(compact
|
|
(array
|
|
'Instances'
|
|
'Tags'
|
|
)
|
|
)
|
|
selected=selectedTab
|
|
}}
|
|
{{/block-slot}}
|
|
{{#block-slot 'content'}}
|
|
{{#each
|
|
(compact
|
|
(array
|
|
(hash id=(slugify 'Instances') partial='dc/services/instances')
|
|
(hash id=(slugify 'Tags') partial='dc/services/tags')
|
|
)
|
|
) as |panel|
|
|
}}
|
|
{{#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}}
|