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

61 lines
2.2 KiB
Handlebars
Raw Normal View History

2017-09-19 14:47:10 +00:00
{{#global-header class="page-header"}}
Jobs
{{/global-header}}
{{#gutter-menu class="page-body" onNamespaceChange=(action "refresh")}}
2017-09-19 14:47:10 +00:00
<section class="section">
{{#if isForbidden}}
{{partial "partials/forbidden-message"}}
2017-09-30 00:41:12 +00:00
{{else}}
{{#if filteredJobs.length}}
<div class="content">
<div>{{search-box searchTerm=(mut searchTerm) placeholder="Search jobs..."}}</div>
</div>
{{/if}}
{{#list-pagination
source=sortedJobs
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="type"}}Type{{/t.sort-by}}
{{#t.sort-by prop="priority"}}Priority{{/t.sort-by}}
<th>Groups</th>
<th class="is-3">Allocation Status</th>
{{/t.head}}
{{#t.body key="model.id" as |row|}}
{{job-row job=row.model onClick=(action "gotoJob" row.model)}}
{{/t.body}}
{{/list-table}}
<div class="table-foot">
<nav class="pagination">
<div class="pagination-numbers">
{{p.startsAt}}&ndash;{{p.endsAt}} of {{sortedJobs.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">
{{#if (eq filteredJobs.length 0)}}
<h3 class="empty-message-headline">No Jobs</h3>
<p class="empty-message-body">
The cluster is currently empty.
</p>
{{else if searchTerm}}
<h3 class="empty-message-headline">No Matches</h3>
<p class="empty-message-body">No jobs match the term <strong>{{searchTerm}}</strong></p>
{{/if}}
</div>
{{/list-pagination}}
{{/if}}
2017-09-19 14:47:10 +00:00
</section>
{{/gutter-menu}}