open-nomad/ui/app/templates/clients/client.hbs

90 lines
3.5 KiB
Handlebars
Raw Normal View History

2017-09-19 14:47:10 +00:00
{{#global-header class="page-header"}}
<li>
{{#link-to "clients.index" data-test-breadcrumb="clients"}}Clients{{/link-to}}
</li>
<li class="is-active">
{{#link-to "clients.client" model.id data-test-breadcrumb="client"}}{{model.shortId}}{{/link-to}}
</li>
2017-09-19 14:47:10 +00:00
{{/global-header}}
{{#gutter-menu class="page-body"}}
<section class="section">
<h1 data-test-title class="title">
<span data-test-node-status="{{model.status}}" class="node-status-light {{model.status}}"></span>
2017-09-19 14:47:10 +00:00
{{or model.name model.shortId}}
<span class="tag is-hollow is-small no-text-transform">{{model.id}}</span>
</h1>
<div class="boxed-section is-small">
<div class="boxed-section-body inline-definitions">
<span class="label">Client Details</span>
<span class="pair" data-test-status-definition><span class="term">Status</span> <span class="status-text node-{{model.status}}">{{model.status}}</span></span>
<span class="pair" data-test-address-definition><span class="term">Address</span> {{model.httpAddr}}</span>
<span class="pair" data-test-datacenter-definition><span class="term">Datacenter</span> {{model.datacenter}}</span>
2017-09-19 14:47:10 +00:00
</div>
</div>
<div class="boxed-section">
<div class="boxed-section-head">
<div>Allocations <span class="badge is-white">{{model.allocations.length}}</span></div>
{{search-box
searchTerm=(mut searchTerm)
placeholder="Search allocations..."
class="is-inline pull-right"
inputClass="is-compact"}}
</div>
<div class="boxed-section-body is-full-bleed">
{{#list-pagination
source=sortedAllocations
size=pageSize
page=currentPage as |p|}}
{{#list-table
source=p.list
sortProperty=sortProperty
sortDescending=sortDescending
class="with-foot" as |t|}}
2017-09-19 14:47:10 +00:00
{{#t.head}}
{{#t.sort-by prop="shortId"}}ID{{/t.sort-by}}
{{#t.sort-by prop="modifyIndex" title="Modify Index"}}Modified{{/t.sort-by}}
2017-09-19 14:47:10 +00:00
{{#t.sort-by prop="name"}}Name{{/t.sort-by}}
{{#t.sort-by prop="statusIndex"}}Status{{/t.sort-by}}
2017-09-19 14:47:10 +00:00
{{#t.sort-by prop="job.name"}}Job{{/t.sort-by}}
2017-10-18 19:29:33 +00:00
{{#t.sort-by prop="jobVersion"}}Version{{/t.sort-by}}
2017-09-19 14:47:10 +00:00
<th>CPU</th>
<th>Memory</th>
{{/t.head}}
{{#t.body as |row|}}
{{allocation-row
allocation=row.model
context="node"
onClick=(action "gotoAllocation" row.model)
data-test-allocation=row.model.id}}
2017-09-19 14:47:10 +00:00
{{/t.body}}
{{/list-table}}
<div class="table-foot">
<nav class="pagination">
<div class="pagination-numbers">
{{p.startsAt}}&ndash;{{p.endsAt}} of {{sortedAllocations.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>
{{/list-pagination}}
</div>
</div>
<div class="boxed-section">
<div class="boxed-section-head">
Attributes
</div>
<div class="boxed-section-body is-full-bleed">
{{attributes-table
data-test-attributes
attributes=model.attributes.attributesStructured
class="attributes-table"}}
2017-09-19 14:47:10 +00:00
</div>
</div>
</section>
{{/gutter-menu}}