open-nomad/ui/app/templates/servers.hbs
2017-09-29 19:20:28 -07:00

54 lines
1.9 KiB
Handlebars

<div class="page-layout">
{{#global-header class="page-header"}}
Servers
{{/global-header}}
{{#gutter-menu class="page-body"}}
<section class="section">
{{#list-pagination
source=sortedAgents
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="name"}}Name{{/t.sort-by}}
{{#t.sort-by prop="status"}}Status{{/t.sort-by}}
{{#t.sort-by prop="isLeader"}}Leader{{/t.sort-by}}
{{#t.sort-by prop="address"}}Address{{/t.sort-by}}
{{#t.sort-by prop="serfPort"}}port{{/t.sort-by}}
{{#t.sort-by prop="datacenter"}}Datacenter{{/t.sort-by}}
{{/t.head}}
{{#t.body as |row|}}
{{server-agent-row agent=row.model}}
{{/t.body}}
{{/list-table}}
<div class="table-foot">
<nav class="pagination">
<div class="pagination-numbers">
{{p.startsAt}}&ndash;{{p.endsAt}} of {{sortedAgents.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>
{{else}}
<div class="empty-message">
<h3 class="empty-message-headline">Invalid Permissions</h3>
<p class="empty-message-body">
{{#if token.secret}}
Your ACL token does not grant access to see servers.
{{else}}
You have no ACL token set. {{#link-to "settings.tokens"}}Provide a token{{/link-to}} with the appropriate permissions to see servers.
{{/if}}
</p>
</div>
{{/list-pagination}}
{{outlet}}
</section>
{{/gutter-menu}}
</div>