2020-11-18 11:11:30 +00:00
|
|
|
{{page-title 'Services'}}
|
2020-12-14 14:25:33 +00:00
|
|
|
|
2020-06-17 13:19:50 +00:00
|
|
|
<EventSource @src={{items}} />
|
2020-12-14 14:25:33 +00:00
|
|
|
|
|
|
|
{{#let
|
|
|
|
|
2021-01-25 18:13:54 +00:00
|
|
|
(hash
|
|
|
|
value=(or sortBy "Status:asc")
|
|
|
|
change=(action (mut sortBy) value="target.selected")
|
|
|
|
)
|
2020-12-14 14:25:33 +00:00
|
|
|
|
|
|
|
(hash
|
2021-01-25 18:13:54 +00:00
|
|
|
status=(hash
|
|
|
|
value=(if status (split status ',') undefined)
|
|
|
|
change=(action (mut status) value="target.selectedItems")
|
|
|
|
)
|
|
|
|
kind=(hash
|
|
|
|
value=(if kind (split kind ',') undefined)
|
|
|
|
change=(action (mut kind) value="target.selectedItems")
|
|
|
|
)
|
|
|
|
source=(hash
|
|
|
|
value=(if source (split source ',') undefined)
|
|
|
|
change=(action (mut source) value="target.selectedItems")
|
|
|
|
)
|
|
|
|
searchproperty=(hash
|
|
|
|
value=(if (not-eq searchproperty undefined)
|
|
|
|
(split searchproperty ',')
|
|
|
|
searchProperties
|
|
|
|
)
|
|
|
|
change=(action (mut searchproperty) value="target.selectedItems")
|
|
|
|
default=searchProperties
|
2020-12-14 14:25:33 +00:00
|
|
|
)
|
2020-12-01 15:45:09 +00:00
|
|
|
)
|
|
|
|
|
2020-12-14 14:25:33 +00:00
|
|
|
(reject-by 'Kind' 'connect-proxy' items)
|
2020-09-01 18:13:11 +00:00
|
|
|
|
2020-12-14 14:25:33 +00:00
|
|
|
as |sort filters items|}}
|
|
|
|
|
|
|
|
<AppView>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h1>
|
|
|
|
Services <em>{{format-number items.length}} total</em>
|
|
|
|
</h1>
|
|
|
|
<label for="toolbar-toggle"></label>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="toolbar">
|
|
|
|
{{#if (gt items.length 0) }}
|
|
|
|
<Consul::Service::SearchBar
|
|
|
|
@sources={{get (collection items) 'ExternalSources'}}
|
2020-09-01 18:13:11 +00:00
|
|
|
|
2020-12-01 15:45:09 +00:00
|
|
|
@search={{search}}
|
2020-12-14 14:25:33 +00:00
|
|
|
@onsearch={{action (mut search) value="target.value"}}
|
|
|
|
|
|
|
|
@sort={{sort}}
|
|
|
|
|
|
|
|
@filter={{filters}}
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2020-12-14 14:25:33 +00:00
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
|
|
|
<DataCollection
|
|
|
|
@type="service"
|
2021-01-25 18:13:54 +00:00
|
|
|
@sort={{sort.value}}
|
2020-12-14 14:25:33 +00:00
|
|
|
@filters={{filters}}
|
|
|
|
@search={{search}}
|
|
|
|
@items={{items}}
|
|
|
|
as |collection|>
|
|
|
|
<collection.Collection>
|
|
|
|
<Consul::Service::List
|
|
|
|
@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>
|
|
|
|
</BlockSlot>
|
|
|
|
|
|
|
|
</AppView>
|
|
|
|
|
2020-05-11 14:04:27 +00:00
|
|
|
{{/let}}
|