2020-01-28 14:25:52 +00:00
|
|
|
{{title 'Services'}}
|
2020-05-11 14:04:27 +00:00
|
|
|
{{#let (selectable-key-values
|
|
|
|
(array "Name:asc" "A to Z")
|
|
|
|
(array "Name:desc" "Z to A")
|
|
|
|
selected=sortBy
|
|
|
|
)
|
|
|
|
as |sort|
|
|
|
|
}}
|
|
|
|
<AppView @class="service list">
|
|
|
|
<BlockSlot @name="notification" as |status type|>
|
|
|
|
{{partial 'dc/services/notifications'}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h1>
|
2020-05-29 15:42:46 +00:00
|
|
|
Services <em>{{format-number services.length}} total</em>
|
2020-05-11 14:04:27 +00:00
|
|
|
</h1>
|
|
|
|
<label for="toolbar-toggle"></label>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="toolbar">
|
2020-05-29 15:42:46 +00:00
|
|
|
{{#if (gt services.length 0) }}
|
|
|
|
<SearchBar
|
2020-05-11 14:04:27 +00:00
|
|
|
@value={{search}}
|
2020-05-29 15:42:46 +00:00
|
|
|
@onsearch={{action (mut search) value="target.value"}}
|
|
|
|
@secondary="sort"
|
2020-05-11 14:04:27 +00:00
|
|
|
@selected={{sort.selected}}
|
|
|
|
@options={{sort.items}}
|
|
|
|
@onchange={{action (mut sortBy) value='target.selected.key'}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
2020-05-29 15:42:46 +00:00
|
|
|
<ChangeableSet @dispatcher={{searchable 'service' (sort-by sort.selected.key services)}} @terms={{search}}>
|
2020-02-19 19:26:38 +00:00
|
|
|
<BlockSlot @name="set" as |filtered|>
|
2020-05-29 15:42:46 +00:00
|
|
|
<ConsulServiceList @routeName="dc.services.show" @items={{filtered}} @proxies={{proxies}}/>
|
2020-05-11 14:04:27 +00:00
|
|
|
</BlockSlot>
|
2020-02-19 19:26:38 +00:00
|
|
|
<BlockSlot @name="empty">
|
2020-05-27 10:23:21 +00:00
|
|
|
<EmptyState @allowLogin={{true}}>
|
|
|
|
<BlockSlot @name="header">
|
2020-05-29 15:42:46 +00:00
|
|
|
<h2>
|
|
|
|
{{#if (gt services.length 0)}}
|
|
|
|
No services found
|
|
|
|
{{else}}
|
|
|
|
Welcome to Services
|
|
|
|
{{/if}}
|
|
|
|
</h2>
|
2020-05-27 10:23:21 +00:00
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="body">
|
|
|
|
<p>
|
2020-05-29 15:42:46 +00:00
|
|
|
{{#if (gt services.length 0)}}
|
|
|
|
No services where found matching that search, or you may not have access to view the services you are searching for.
|
|
|
|
{{else}}
|
|
|
|
There don't seem to be any registered services, or you may not have access to view services yet.
|
|
|
|
{{/if}}
|
2020-05-27 10:23:21 +00:00
|
|
|
</p>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="actions">
|
|
|
|
<li class="docs-link">
|
|
|
|
<a href="{{env 'CONSUL_DOCS_URL'}}/commands/services" rel="noopener noreferrer" target="_blank">Documentation on services</a>
|
|
|
|
</li>
|
|
|
|
<li class="learn-link">
|
|
|
|
<a href="{{env 'CONSUL_DOCS_LEARN_URL'}}/consul/getting-started/services" rel="noopener noreferrer" target="_blank">Read the guide</a>
|
|
|
|
</li>
|
|
|
|
</BlockSlot>
|
|
|
|
</EmptyState>
|
2020-02-19 19:26:38 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</ChangeableSet>
|
2020-05-11 14:04:27 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|
|
|
|
{{/let}}
|