2021-03-08 12:15:54 +00:00
|
|
|
<Route
|
|
|
|
@name={{routeName}}
|
2021-04-06 12:40:40 +00:00
|
|
|
as |route|>
|
2020-12-14 14:25:33 +00:00
|
|
|
|
2021-09-15 18:50:11 +00:00
|
|
|
<DataLoader @src={{
|
|
|
|
uri '/${partition}/${nspace}/${dc}/services'
|
|
|
|
(hash
|
|
|
|
partition=route.params.partition
|
|
|
|
nspace=route.params.nspace
|
|
|
|
dc=route.params.dc
|
|
|
|
)
|
|
|
|
}} as |api|>
|
|
|
|
|
|
|
|
<BlockSlot @name="error">
|
|
|
|
<AppError
|
|
|
|
@error={{api.error}}
|
|
|
|
@login={{route.model.app.login.open}}
|
|
|
|
/>
|
|
|
|
</BlockSlot>
|
|
|
|
|
|
|
|
<BlockSlot @name="loaded">
|
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
|
|
|
)
|
2021-09-15 18:50:11 +00:00
|
|
|
|
2020-12-01 15:45:09 +00:00
|
|
|
)
|
|
|
|
|
2021-09-15 18:50:11 +00:00
|
|
|
(reject-by 'Kind' 'connect-proxy' api.data)
|
2020-09-01 18:13:11 +00:00
|
|
|
|
2021-12-06 11:06:33 +00:00
|
|
|
(or route.params.partition route.model.user.token.Partition 'default')
|
|
|
|
(or route.params.nspace route.model.user.token.Namespace 'default')
|
|
|
|
|
|
|
|
as |sort filters items partition nspace|}}
|
2020-12-14 14:25:33 +00:00
|
|
|
|
|
|
|
<AppView>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h1>
|
2021-09-15 18:50:11 +00:00
|
|
|
<route.Title @title="Services" /> <em>{{format-number items.length}} total</em>
|
2020-12-14 14:25:33 +00:00
|
|
|
</h1>
|
|
|
|
<label for="toolbar-toggle"></label>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="toolbar">
|
2021-12-06 11:06:33 +00:00
|
|
|
{{#if (gt items.length 0) }}
|
|
|
|
{{#let (collection items) as |items|}}
|
2020-12-14 14:25:33 +00:00
|
|
|
<Consul::Service::SearchBar
|
2021-12-06 11:06:33 +00:00
|
|
|
@sources={{get items 'ExternalSources'}}
|
|
|
|
@partitions={{get items 'Partitions'}}
|
|
|
|
@partition={{partition}}
|
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
|
|
|
/>
|
2021-12-06 11:06:33 +00:00
|
|
|
{{/let}}
|
|
|
|
{{/if}}
|
2020-12-14 14:25:33 +00:00
|
|
|
</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}}
|
2021-12-06 11:06:33 +00:00
|
|
|
@partition={{partition}}
|
2020-12-14 14:25:33 +00:00
|
|
|
>
|
|
|
|
</Consul::Service::List>
|
|
|
|
</collection.Collection>
|
|
|
|
<collection.Empty>
|
2021-04-06 12:40:40 +00:00
|
|
|
<EmptyState
|
|
|
|
@login={{route.model.app.login.open}}
|
|
|
|
>
|
2020-12-14 14:25:33 +00:00
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h2>
|
2021-12-21 06:49:18 +00:00
|
|
|
{{#if (gt items.length 0)}}
|
2020-12-14 14:25:33 +00:00
|
|
|
No services found
|
|
|
|
{{else}}
|
|
|
|
Welcome to Services
|
|
|
|
{{/if}}
|
|
|
|
</h2>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="body">
|
|
|
|
<p>
|
2021-12-21 06:49:18 +00:00
|
|
|
{{#if (gt items.length 0)}}
|
2020-12-14 14:25:33 +00:00
|
|
|
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">
|
2021-12-06 11:06:33 +00:00
|
|
|
<Action
|
|
|
|
@href="{{env 'CONSUL_DOCS_URL'}}/commands/services"
|
|
|
|
@external={{true}}
|
|
|
|
>
|
|
|
|
Documentation on services
|
|
|
|
</Action>
|
2020-12-14 14:25:33 +00:00
|
|
|
</li>
|
|
|
|
<li class="learn-link">
|
2021-12-06 11:06:33 +00:00
|
|
|
<Action
|
|
|
|
@href="{{env 'CONSUL_DOCS_LEARN_URL'}}/consul/getting-started/services"
|
|
|
|
@external={{true}}
|
|
|
|
>
|
|
|
|
Read the guide
|
|
|
|
</Action>
|
2020-12-14 14:25:33 +00:00
|
|
|
</li>
|
|
|
|
</BlockSlot>
|
|
|
|
</EmptyState>
|
|
|
|
</collection.Empty>
|
|
|
|
</DataCollection>
|
|
|
|
</BlockSlot>
|
|
|
|
|
|
|
|
</AppView>
|
|
|
|
|
2020-05-11 14:04:27 +00:00
|
|
|
{{/let}}
|
2021-09-15 18:50:11 +00:00
|
|
|
|
|
|
|
</BlockSlot>
|
|
|
|
</DataLoader>
|
2021-03-08 12:15:54 +00:00
|
|
|
</Route>
|