2020-11-18 11:11:30 +00:00
|
|
|
{{page-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)
|
2020-11-13 15:55:40 +00:00
|
|
|
kinds=(if kind (split kind ',') undefined)
|
2020-09-01 18:13:11 +00:00
|
|
|
sources=(if source (split source ',') undefined)
|
2020-12-01 15:45:09 +00:00
|
|
|
searchproperties=(if (not-eq searchproperty undefined)
|
|
|
|
(split searchproperty ',')
|
|
|
|
(array 'Name' 'Tags')
|
|
|
|
)
|
2020-09-01 18:13:11 +00:00
|
|
|
) as |filters|}}
|
2020-11-19 16:05:46 +00:00
|
|
|
{{#let (or sortBy "Status: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|>
|
2020-10-19 16:31:01 +00:00
|
|
|
<Consul::Service::Notifications
|
|
|
|
@type={{type}}
|
|
|
|
@status={{status}}
|
|
|
|
/>
|
2020-05-11 14:04:27 +00:00
|
|
|
</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}}
|
2020-12-01 15:45:09 +00:00
|
|
|
|
2020-09-01 18:13:11 +00:00
|
|
|
@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
|
2020-12-01 15:45:09 +00:00
|
|
|
searchproperty=(action (mut searchproperty) value="target.selectedItems")
|
2020-09-01 18:13:11 +00:00
|
|
|
status=(action (mut status) value="target.selectedItems")
|
2020-11-13 15:55:40 +00:00
|
|
|
kind=(action (mut kind) value="target.selectedItems")
|
2020-09-01 18:13:11 +00:00
|
|
|
source=(action (mut source) value="target.selectedItems")
|
|
|
|
}}
|
|
|
|
/>
|
2020-05-11 14:04:27 +00:00
|
|
|
{{/if}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
2020-12-01 15:45:09 +00:00
|
|
|
<DataCollection
|
|
|
|
@type="service"
|
|
|
|
@sort={{sort}}
|
|
|
|
@filters={{filters}}
|
|
|
|
@search={{search}}
|
|
|
|
@items={{services}}
|
|
|
|
as |collection|>
|
|
|
|
<collection.Collection>
|
|
|
|
<Consul::Service::List
|
|
|
|
@sort={{sort}}
|
|
|
|
@filters={{filters}}
|
|
|
|
@search={{search}}
|
|
|
|
@items={{collection.items}}
|
|
|
|
>
|
|
|
|
</Consul::Service::List>
|
|
|
|
</collection.Collection>
|
|
|
|
<collection.Empty>
|
|
|
|
<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>
|
|
|
|
</collection.Empty>
|
|
|
|
</DataCollection>
|
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}}
|