2022-10-13 13:29:51 +00:00
|
|
|
<Route @name={{routeName}} as |route|>
|
2021-09-15 18:50:11 +00:00
|
|
|
|
2022-10-13 13:29:51 +00:00
|
|
|
<DataSource
|
|
|
|
@src={{uri
|
|
|
|
'/${partition}/${nspace}/${dc}/leader'
|
|
|
|
(hash partition=route.params.partition nspace=route.params.nspace dc=route.params.dc)
|
|
|
|
}}
|
|
|
|
as |leader|
|
|
|
|
>
|
2021-09-15 18:50:11 +00:00
|
|
|
|
|
|
|
<DataLoader
|
2022-10-13 13:29:51 +00:00
|
|
|
@src={{uri
|
|
|
|
'/${partition}/${nspace}/${dc}/nodes'
|
|
|
|
(hash partition=route.params.partition nspace=route.params.nspace dc=route.params.dc)
|
2021-09-15 18:50:11 +00:00
|
|
|
}}
|
2022-10-13 13:29:51 +00:00
|
|
|
as |api|
|
|
|
|
>
|
2021-01-25 18:13:54 +00:00
|
|
|
|
2022-10-13 13:29:51 +00:00
|
|
|
<BlockSlot @name='error'>
|
|
|
|
<AppError @error={{api.error}} @login={{route.model.app.login.open}} />
|
2021-04-06 12:40:40 +00:00
|
|
|
</BlockSlot>
|
2020-09-01 18:13:11 +00:00
|
|
|
|
2022-10-13 13:29:51 +00:00
|
|
|
<BlockSlot @name='loaded'>
|
|
|
|
{{#let
|
|
|
|
(hash value=(or sortBy 'Status:asc') change=(action (mut sortBy) value='target.selected'))
|
|
|
|
(hash
|
|
|
|
status=(hash
|
|
|
|
value=(if status (split status ',') undefined)
|
|
|
|
change=(action (mut status) value='target.selectedItems')
|
|
|
|
)
|
|
|
|
searchproperty=(hash
|
|
|
|
value=(if
|
|
|
|
(not-eq searchproperty undefined) (split searchproperty ',') this._searchProperties
|
|
|
|
)
|
|
|
|
change=(action (mut searchproperty) value='target.selectedItems')
|
|
|
|
default=this._searchProperties
|
|
|
|
)
|
|
|
|
)
|
|
|
|
api.data
|
|
|
|
leader.data
|
|
|
|
as |sort filters items leader|
|
|
|
|
}}
|
2022-10-13 14:41:26 +00:00
|
|
|
{{#let (reject-by 'Meta.synthetic-node' items) as |filtered|}}
|
2022-10-13 13:29:51 +00:00
|
|
|
<AppView>
|
|
|
|
<BlockSlot @name='header'>
|
|
|
|
<h1>
|
|
|
|
<route.Title @title='Nodes' />
|
|
|
|
<em>{{format-number items.length}} total</em>
|
|
|
|
</h1>
|
|
|
|
<label for='toolbar-toggle'></label>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name='toolbar'>
|
|
|
|
{{#if (gt filtered.length 0)}}
|
|
|
|
<Consul::Node::SearchBar
|
|
|
|
@search={{search}}
|
|
|
|
@onsearch={{action (mut search) value='target.value'}}
|
|
|
|
@sort={{sort}}
|
|
|
|
@filter={{filters}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name='content'>
|
2022-10-13 14:28:46 +00:00
|
|
|
<Consul::Node::AgentlessNotice @items={{items}} @filteredItems={{filtered}} />
|
2022-10-13 13:29:51 +00:00
|
|
|
<DataCollection
|
|
|
|
@type='node'
|
|
|
|
@sort={{sort.value}}
|
|
|
|
@filters={{filters}}
|
|
|
|
@search={{search}}
|
|
|
|
@items={{filtered}}
|
|
|
|
as |collection|
|
|
|
|
>
|
|
|
|
<collection.Collection>
|
|
|
|
<Consul::Node::List @items={{collection.items}} @leader={{leader}} />
|
|
|
|
</collection.Collection>
|
|
|
|
<collection.Empty>
|
|
|
|
<EmptyState @login={{route.model.app.login.open}}>
|
|
|
|
<BlockSlot @name='header'>
|
|
|
|
<h2>
|
|
|
|
{{t 'routes.dc.nodes.index.empty.header' items=items.length}}
|
|
|
|
</h2>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name='body'>
|
|
|
|
{{t
|
|
|
|
'routes.dc.nodes.index.empty.body'
|
|
|
|
items=items.length
|
|
|
|
canUseACLs=(can 'use acls')
|
|
|
|
htmlSafe=true
|
|
|
|
}}
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name='actions'>
|
|
|
|
<li class='docs-link'>
|
|
|
|
<a
|
|
|
|
href='{{env "CONSUL_DOCS_DEVELOPER_URL"}}/agent'
|
|
|
|
rel='noopener noreferrer'
|
|
|
|
target='_blank'
|
|
|
|
>
|
|
|
|
{{t 'routes.dc.nodes.index.empty.documentation'}}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class='learn-link'>
|
|
|
|
<a
|
|
|
|
href='{{env
|
|
|
|
"CONSUL_DOCS_LEARN_URL"
|
|
|
|
}}/tutorials/consul/deployment-guide?in=consul/production-deploy#configure-consul-agents'
|
|
|
|
rel='noopener noreferrer'
|
|
|
|
target='_blank'
|
|
|
|
>
|
|
|
|
{{t 'routes.dc.nodes.index.empty.learn'}}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</BlockSlot>
|
|
|
|
</EmptyState>
|
|
|
|
</collection.Empty>
|
|
|
|
</DataCollection>
|
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|
|
|
|
{{/let}}
|
|
|
|
{{/let}}
|
2021-04-06 12:40:40 +00:00
|
|
|
</BlockSlot>
|
2021-09-15 18:50:11 +00:00
|
|
|
</DataLoader>
|
|
|
|
</DataSource>
|
2022-10-13 13:29:51 +00:00
|
|
|
</Route>
|