2019-07-17 20:02:58 +00:00
|
|
|
|
{{title "Jobs"}}
|
2018-07-25 22:19:43 +00:00
|
|
|
|
<section class="section">
|
|
|
|
|
{{#if isForbidden}}
|
|
|
|
|
{{partial "partials/forbidden-message"}}
|
|
|
|
|
{{else}}
|
2019-03-07 05:00:30 +00:00
|
|
|
|
<div class="toolbar">
|
2019-05-15 18:25:30 +00:00
|
|
|
|
<div class="toolbar-item">
|
|
|
|
|
{{#if visibleJobs.length}}
|
2018-10-30 17:52:54 +00:00
|
|
|
|
{{search-box
|
|
|
|
|
data-test-jobs-search
|
|
|
|
|
searchTerm=(mut searchTerm)
|
|
|
|
|
onChange=(action resetPagination)
|
|
|
|
|
placeholder="Search jobs..."}}
|
2019-05-15 18:25:30 +00:00
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
2019-03-07 05:00:30 +00:00
|
|
|
|
{{#if (media "isMobile")}}
|
|
|
|
|
<div class="toolbar-item is-right-aligned">
|
2020-01-20 20:57:01 +00:00
|
|
|
|
{{#if (can "run job")}}
|
|
|
|
|
{{#link-to "jobs.run" data-test-run-job class="button is-primary"}}Run Job{{/link-to}}
|
|
|
|
|
{{else}}
|
2020-01-30 22:14:04 +00:00
|
|
|
|
<button
|
|
|
|
|
data-test-run-job
|
|
|
|
|
class="button is-primary is-disabled tooltip is-right-aligned"
|
|
|
|
|
aria-label="You don’t have permission to run jobs"
|
|
|
|
|
disabled
|
|
|
|
|
>Run Job</button>
|
2020-01-20 20:57:01 +00:00
|
|
|
|
{{/if}}
|
2019-03-07 05:00:30 +00:00
|
|
|
|
</div>
|
|
|
|
|
{{/if}}
|
|
|
|
|
<div class="toolbar-item is-right-aligned is-mobile-full-width">
|
|
|
|
|
<div class="button-bar">
|
2019-01-17 00:29:31 +00:00
|
|
|
|
{{multi-select-dropdown
|
2019-01-24 04:35:51 +00:00
|
|
|
|
data-test-type-facet
|
2019-01-17 00:29:31 +00:00
|
|
|
|
label="Type"
|
2019-02-01 22:08:55 +00:00
|
|
|
|
options=optionsType
|
|
|
|
|
selection=selectionType
|
2019-01-23 21:56:32 +00:00
|
|
|
|
onSelect=(action setFacetQueryParam "qpType")}}
|
2019-01-17 00:29:31 +00:00
|
|
|
|
{{multi-select-dropdown
|
2019-01-24 04:35:51 +00:00
|
|
|
|
data-test-status-facet
|
2019-01-17 00:29:31 +00:00
|
|
|
|
label="Status"
|
2019-02-01 22:08:55 +00:00
|
|
|
|
options=optionsStatus
|
|
|
|
|
selection=selectionStatus
|
2019-01-23 21:56:32 +00:00
|
|
|
|
onSelect=(action setFacetQueryParam "qpStatus")}}
|
2019-01-17 00:29:31 +00:00
|
|
|
|
{{multi-select-dropdown
|
2019-01-24 04:35:51 +00:00
|
|
|
|
data-test-datacenter-facet
|
2019-01-17 00:29:31 +00:00
|
|
|
|
label="Datacenter"
|
2019-02-01 22:08:55 +00:00
|
|
|
|
options=optionsDatacenter
|
|
|
|
|
selection=selectionDatacenter
|
2019-01-23 21:56:32 +00:00
|
|
|
|
onSelect=(action setFacetQueryParam "qpDatacenter")}}
|
2019-01-17 00:29:31 +00:00
|
|
|
|
{{multi-select-dropdown
|
2019-01-24 04:35:51 +00:00
|
|
|
|
data-test-prefix-facet
|
2019-01-17 00:29:31 +00:00
|
|
|
|
label="Prefix"
|
2019-02-01 22:08:55 +00:00
|
|
|
|
options=optionsPrefix
|
|
|
|
|
selection=selectionPrefix
|
2019-01-23 21:56:32 +00:00
|
|
|
|
onSelect=(action setFacetQueryParam "qpPrefix")}}
|
2019-01-17 00:29:31 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-03-07 05:00:30 +00:00
|
|
|
|
{{#if (not (media "isMobile"))}}
|
|
|
|
|
<div class="toolbar-item is-right-aligned">
|
2020-01-20 20:57:01 +00:00
|
|
|
|
{{#if (can "run job")}}
|
|
|
|
|
{{#link-to "jobs.run" data-test-run-job class="button is-primary"}}Run Job{{/link-to}}
|
|
|
|
|
{{else}}
|
2020-01-30 22:14:04 +00:00
|
|
|
|
<button
|
|
|
|
|
data-test-run-job
|
|
|
|
|
class="button is-primary is-disabled tooltip is-right-aligned"
|
|
|
|
|
aria-label="You don’t have permission to run jobs"
|
|
|
|
|
disabled
|
|
|
|
|
>Run Job</button>
|
2020-01-20 20:57:01 +00:00
|
|
|
|
{{/if}}
|
2019-03-07 05:00:30 +00:00
|
|
|
|
</div>
|
|
|
|
|
{{/if}}
|
2018-08-14 19:54:54 +00:00
|
|
|
|
</div>
|
2019-10-24 12:05:43 +00:00
|
|
|
|
{{#if sortedJobs}}
|
|
|
|
|
{{#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|}}
|
|
|
|
|
{{job-row data-test-job-row=row.model.plainId job=row.model onClick=(action "gotoJob" row.model)}}
|
|
|
|
|
{{/t.body}}
|
|
|
|
|
{{/list-table}}
|
|
|
|
|
<div class="table-foot">
|
2020-03-31 04:13:32 +00:00
|
|
|
|
{{page-size-select}}
|
2019-10-24 12:05:43 +00:00
|
|
|
|
<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>
|
2020-03-31 04:20:32 +00:00
|
|
|
|
{{#p.prev class="pagination-previous"}}{{x-icon "chevron-left"}}{{/p.prev}}
|
|
|
|
|
{{#p.next class="pagination-next"}}{{x-icon "chevron-right"}}{{/p.next}}
|
2019-10-24 12:05:43 +00:00
|
|
|
|
<ul class="pagination-list"></ul>
|
|
|
|
|
</nav>
|
|
|
|
|
</div>
|
|
|
|
|
{{/list-pagination}}
|
2018-07-25 22:19:43 +00:00
|
|
|
|
{{else}}
|
|
|
|
|
<div data-test-empty-jobs-list class="empty-message">
|
2019-01-24 04:35:51 +00:00
|
|
|
|
{{#if (eq visibleJobs.length 0)}}
|
2018-07-25 22:19:43 +00:00
|
|
|
|
<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>
|
2019-01-24 04:35:51 +00:00
|
|
|
|
{{else if (eq filteredJobs.length 0)}}
|
|
|
|
|
<h3 data-test-empty-jobs-list-headline class="empty-message-headline">No Matches</h3>
|
|
|
|
|
<p class="empty-message-body">
|
|
|
|
|
No jobs match your current filter selection.
|
|
|
|
|
</p>
|
2018-07-25 22:19:43 +00:00
|
|
|
|
{{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>
|
2019-10-24 12:05:43 +00:00
|
|
|
|
{{/if}}
|
2018-07-25 22:19:43 +00:00
|
|
|
|
{{/if}}
|
|
|
|
|
</section>
|