2020-01-28 14:25:52 +00:00
|
|
|
{{title 'Services'}}
|
2020-06-17 13:19:50 +00:00
|
|
|
<EventSource @src={{items}} />
|
2020-05-11 14:04:27 +00:00
|
|
|
{{#let (selectable-key-values
|
|
|
|
(array "Name:asc" "A to Z")
|
|
|
|
(array "Name:desc" "Z to A")
|
2020-06-03 17:46:20 +00:00
|
|
|
(array "Status:asc" "Unhealthy to Healthy")
|
|
|
|
(array "Status:desc" "Healthy to Unhealthy")
|
2020-05-11 14:04:27 +00:00
|
|
|
selected=sortBy
|
|
|
|
)
|
|
|
|
as |sort|
|
|
|
|
}}
|
|
|
|
<AppView @class="service list">
|
|
|
|
<BlockSlot @name="notification" as |status type|>
|
|
|
|
{{partial 'dc/services/notifications'}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h1>
|
2020-06-03 17:46:20 +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-06-03 17:46:20 +00:00
|
|
|
{{#if (gt services.length 0) }}
|
|
|
|
<SearchBar
|
2020-05-11 14:04:27 +00:00
|
|
|
@value={{search}}
|
2020-06-03 17:46:20 +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-06-03 17:46:20 +00:00
|
|
|
{{#let (sort-by (comparator 'service' sort.selected.key) services) as |sorted|}}
|
|
|
|
<ChangeableSet @dispatcher={{searchable 'service' sorted}} @terms={{search}}>
|
2020-02-19 19:26:38 +00:00
|
|
|
<BlockSlot @name="set" as |filtered|>
|
2020-06-10 16:40:22 +00:00
|
|
|
<ConsulServiceList @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-06-03 17:46:20 +00:00
|
|
|
<EmptyState @allowLogin={{true}}>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h2>
|
|
|
|
{{#if (gt services.length 0)}}
|
|
|
|
No services found
|
|
|
|
{{else}}
|
|
|
|
Welcome to Services
|
|
|
|
{{/if}}
|
|
|
|
</h2>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="body">
|
|
|
|
<p>
|
|
|
|
{{#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}}
|
|
|
|
</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-06-03 17:46:20 +00:00
|
|
|
{{/let}}
|
2020-05-11 14:04:27 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|
|
|
|
{{/let}}
|