open-consul/ui-v2/app/templates/dc/services/index.hbs
John Cowen f5ff096d78 ui: Add consul-service-list presentational component (#7279)
This commit moves our service list into a new presentational component,
and is therefore mainly just moving things around. The main thing moved
here is the logic required to resizing columns correctly is now moved to
a component instead of the controller
2020-05-12 17:13:56 +00:00

36 lines
1.1 KiB
Handlebars

{{title 'Services'}}
{{#app-view class="service list"}}
{{#block-slot name='notification' as |status type|}}
{{partial 'dc/services/notifications'}}
{{/block-slot}}
{{#block-slot name='header'}}
<h1>
Services <em>{{format-number items.length}} total</em>
</h1>
<label for="toolbar-toggle"></label>
{{/block-slot}}
{{#block-slot name='toolbar'}}
{{#if (gt items.length 0) }}
{{phrase-editor
placeholder='service:name tag:name status:critical search-term'
value=(slice 0 terms.length terms)
onchange=(action (mut terms) value='target.value')
searchable=searchable
}}
{{/if}}
{{/block-slot}}
{{#block-slot name='content'}}
{{#changeable-set dispatcher=searchable}}
{{#block-slot name='set' as |filtered|}}
{{consul-service-list routeName="dc.services.show" items=filtered}}
{{/block-slot}}
{{#block-slot name='empty'}}
<p>
There are no services.
</p>
{{/block-slot}}
{{/changeable-set}}
{{/block-slot}}
{{/app-view}}