2018-07-25 22:19:43 +00:00
|
|
|
<section class="section">
|
|
|
|
{{#if isForbidden}}
|
|
|
|
{{partial "partials/forbidden-message"}}
|
|
|
|
{{else}}
|
2018-08-14 19:54:54 +00:00
|
|
|
<div class="columns">
|
|
|
|
{{#if filteredJobs.length}}
|
|
|
|
<div class="column">
|
2018-10-30 17:52:54 +00:00
|
|
|
{{search-box
|
|
|
|
data-test-jobs-search
|
|
|
|
searchTerm=(mut searchTerm)
|
|
|
|
onChange=(action resetPagination)
|
|
|
|
placeholder="Search jobs..."}}
|
2018-08-14 19:54:54 +00:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
<div class="column is-centered">
|
2018-08-16 00:12:18 +00:00
|
|
|
{{#link-to "jobs.run" data-test-run-job class="button is-primary is-pulled-right"}}Run Job{{/link-to}}
|
2018-07-25 22:19:43 +00:00
|
|
|
</div>
|
2018-08-14 19:54:54 +00:00
|
|
|
</div>
|
2018-07-25 22:19:43 +00:00
|
|
|
{{#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">Summary</th>
|
|
|
|
{{/t.head}}
|
|
|
|
{{#t.body key="model.id" as |row|}}
|
2018-08-10 18:20:44 +00:00
|
|
|
{{job-row data-test-job-row=row.model.plainId job=row.model onClick=(action "gotoJob" row.model)}}
|
2018-07-25 22:19:43 +00:00
|
|
|
{{/t.body}}
|
|
|
|
{{/list-table}}
|
|
|
|
<div class="table-foot">
|
|
|
|
<nav class="pagination">
|
|
|
|
<div class="pagination-numbers">
|
|
|
|
{{p.startsAt}}–{{p.endsAt}} of {{sortedJobs.length}}
|
|
|
|
{{#if searchTerm}}
|
|
|
|
<em>({{dec sortedJobs.length filteredJobs.length}} hidden by search term)</em>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
{{#p.prev class="pagination-previous"}} < {{/p.prev}}
|
|
|
|
{{#p.next class="pagination-next"}} > {{/p.next}}
|
|
|
|
<ul class="pagination-list"></ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<div data-test-empty-jobs-list class="empty-message">
|
|
|
|
{{#if (eq filteredJobs.length 0)}}
|
|
|
|
<h3 data-test-empty-jobs-list-headline class="empty-message-headline">No Jobs</h3>
|
|
|
|
<p class="empty-message-body">
|
|
|
|
The cluster is currently empty.
|
|
|
|
</p>
|
|
|
|
{{else if searchTerm}}
|
|
|
|
<h3 data-test-empty-jobs-list-headline 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}}
|
|
|
|
</section>
|