2020-01-28 14:25:52 +00:00
|
|
|
{{title 'Services'}}
|
2020-06-17 13:19:50 +00:00
|
|
|
<EventSource @src={{items}} />
|
2020-08-11 17:02:51 +00:00
|
|
|
{{#let (or sortBy "Name:asc") as |sort|}}
|
2020-05-11 14:04:27 +00:00
|
|
|
<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"}}
|
2020-08-11 17:02:51 +00:00
|
|
|
class="with-sort"
|
|
|
|
>
|
|
|
|
<BlockSlot @name="secondary">
|
|
|
|
<PopoverSelect
|
|
|
|
@position="right"
|
|
|
|
@onchange={{action (mut sortBy) value='target.selected'}}
|
|
|
|
@multiple={{false}}
|
|
|
|
as |components|>
|
|
|
|
<BlockSlot @name="selected">
|
|
|
|
<span>
|
|
|
|
{{#let (from-entries (array
|
|
|
|
(array "Name:asc" "A to Z")
|
|
|
|
(array "Name:desc" "Z to A")
|
|
|
|
(array "Status:asc" "Unhealthy to Healthy")
|
|
|
|
(array "Status:desc" "Healthy to Unhealthy")
|
|
|
|
))
|
|
|
|
as |selectable|
|
|
|
|
}}
|
|
|
|
{{get selectable sort}}
|
|
|
|
{{/let}}
|
|
|
|
</span>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="options">
|
|
|
|
{{#let components.Optgroup components.Option as |Optgroup Option|}}
|
|
|
|
<Optgroup @label="Health Status">
|
|
|
|
<Option @value="Status:asc" @selected={{eq "Status:asc" sort}}>Unhealthy to Healthy</Option>
|
|
|
|
<Option @value="Status:desc" @selected={{eq "Status:desc" sort}}>Healthy to Unhealthy</Option>
|
|
|
|
</Optgroup>
|
|
|
|
<Optgroup @label="Service Name">
|
|
|
|
<Option @value="Name:asc" @selected={{eq "Name:asc" sort}}>A to Z</Option>
|
|
|
|
<Option @value="Name:desc" @selected={{eq "Name:desc" sort}}>Z to A</Option>
|
|
|
|
</Optgroup>
|
|
|
|
{{/let}}
|
|
|
|
</BlockSlot>
|
|
|
|
</PopoverSelect>
|
|
|
|
</BlockSlot>
|
|
|
|
</SearchBar>
|
2020-05-11 14:04:27 +00:00
|
|
|
{{/if}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
2020-08-11 17:02:51 +00:00
|
|
|
{{#let (sort-by (comparator 'service' sort) services) as |sorted|}}
|
2020-06-03 16:07:49 +00:00
|
|
|
<ChangeableSet @dispatcher={{searchable 'service' sorted}} @terms={{search}}>
|
2020-02-19 19:26:38 +00:00
|
|
|
<BlockSlot @name="set" as |filtered|>
|
2020-08-21 07:53:22 +00:00
|
|
|
<ConsulServiceList @items={{filtered}}/>
|
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-06-03 16:07:49 +00:00
|
|
|
{{/let}}
|
2020-05-11 14:04:27 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|
|
|
|
{{/let}}
|