2020-01-28 14:25:52 +00:00
|
|
|
{{title 'Services'}}
|
2020-06-17 13:19:50 +00:00
|
|
|
<EventSource @src={{items}} />
|
2020-09-01 18:13:11 +00:00
|
|
|
{{#let (hash
|
|
|
|
statuses=(if status (split status ',') undefined)
|
|
|
|
types=(if type (split type ',') undefined)
|
|
|
|
sources=(if source (split source ',') undefined)
|
|
|
|
) as |filters|}}
|
|
|
|
{{#let (or sortBy "Name:asc") as |sort|}}
|
2020-10-01 08:33:22 +00:00
|
|
|
<AppView>
|
2020-05-11 14:04:27 +00:00
|
|
|
<BlockSlot @name="notification" as |status type|>
|
|
|
|
{{partial 'dc/services/notifications'}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h1>
|
2020-09-01 18:13:11 +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) }}
|
2020-10-14 08:03:39 +00:00
|
|
|
<Consul::Service::SearchBar
|
2020-09-01 18:13:11 +00:00
|
|
|
@sources={{externalSources}}
|
|
|
|
@search={{search}}
|
2020-05-29 15:42:46 +00:00
|
|
|
@onsearch={{action (mut search) value="target.value"}}
|
2020-09-01 18:13:11 +00:00
|
|
|
|
|
|
|
@sort={{sort}}
|
|
|
|
@onsort={{action (mut sortBy) value="target.selected"}}
|
|
|
|
|
|
|
|
@filter={{filters}}
|
|
|
|
@onfilter={{hash
|
|
|
|
status=(action (mut status) value="target.selectedItems")
|
|
|
|
type=(action (mut type) value="target.selectedItems")
|
|
|
|
source=(action (mut source) value="target.selectedItems")
|
|
|
|
}}
|
|
|
|
/>
|
2020-05-11 14:04:27 +00:00
|
|
|
{{/if}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
2020-09-01 18:13:11 +00:00
|
|
|
{{#let (filter (filter-predicate 'service' filters) services) as |filtered|}}
|
|
|
|
{{#let (sort-by (comparator 'service' sort) filtered) as |sorted|}}
|
2020-06-03 16:07:49 +00:00
|
|
|
<ChangeableSet @dispatcher={{searchable 'service' sorted}} @terms={{search}}>
|
2020-09-01 18:13:11 +00:00
|
|
|
<BlockSlot @name="set" as |searched|>
|
2020-10-14 08:03:39 +00:00
|
|
|
<Consul::Service::List @items={{searched}} />
|
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-09-01 18:13:11 +00:00
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
2020-05-11 14:04:27 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|
2020-09-01 18:13:11 +00:00
|
|
|
{{/let}}
|
2020-05-11 14:04:27 +00:00
|
|
|
{{/let}}
|