open-nomad/ui/app/templates/nodes/index.hbs

58 lines
2.1 KiB
Handlebars
Raw Normal View History

2017-09-19 14:47:10 +00:00
{{#global-header class="page-header"}}
Nodes
{{/global-header}}
{{#gutter-menu class="page-body"}}
<section class="section">
2017-09-30 01:33:57 +00:00
{{#if nodes.length}}
<div class="content">
<div>{{search-box searchTerm=(mut searchTerm) placeholder="Search nodes..."}}</div>
</div>
{{/if}}
2017-09-19 14:47:10 +00:00
{{#list-pagination
source=sortedNodes
size=pageSize
page=currentPage as |p|}}
{{#list-table
source=p.list
sortProperty=sortProperty
sortDescending=sortDescending
class="with-foot" as |t|}}
{{#t.head}}
{{#t.sort-by prop="id"}}ID{{/t.sort-by}}
{{#t.sort-by class="is-200px is-truncatable" prop="name"}}Name{{/t.sort-by}}
{{#t.sort-by prop="status"}}Status{{/t.sort-by}}
<th>Address</th>
<th>Port</th>
{{#t.sort-by prop="datacenter"}}Datacenter{{/t.sort-by}}
<th># Allocs</th>
{{/t.head}}
{{#t.body as |row|}}
{{client-node-row node=row.model onClick=(action "gotoNode" row.model)}}
{{/t.body}}
{{/list-table}}
<div class="table-foot">
<nav class="pagination">
<div class="pagination-numbers">
{{p.startsAt}}&ndash;{{p.endsAt}} of {{sortedNodes.length}}
</div>
{{#p.prev class="pagination-previous"}} &lt; {{/p.prev}}
{{#p.next class="pagination-next"}} &gt; {{/p.next}}
<ul class="pagination-list"></ul>
</nav>
</div>
2017-09-30 01:33:57 +00:00
{{else}}
<div class="empty-message">
{{#if (eq nodes.length 0)}}
<h3 class="empty-message-headline">No Clients</h3>
<p class="empty-message-body">
There are currently no visible nodes in the cluster. This could mean that the cluster is bootstrapped with no clients. It could also mean {{#link-to "settings.tokens"}}you don't have access to see any clients{{/link-to}}.
</p>
{{else if searchTerm}}
<h3 class="empty-message-headline">No Matches</h3>
<p class="empty-message-body">No clients match the term <strong>{{searchTerm}}</strong></p>
{{/if}}
</div>
2017-09-19 14:47:10 +00:00
{{/list-pagination}}
</section>
{{/gutter-menu}}