2021-02-17 21:01:44 +00:00
|
|
|
|
{{page-title "Jobs"}}
|
2018-07-25 22:19:43 +00:00
|
|
|
|
<section class="section">
|
2020-07-09 20:19:07 +00:00
|
|
|
|
{{#if this.isForbidden}}
|
2020-07-09 16:37:00 +00:00
|
|
|
|
<ForbiddenMessage />
|
2018-07-25 22:19:43 +00:00
|
|
|
|
{{else}}
|
2019-03-07 05:00:30 +00:00
|
|
|
|
<div class="toolbar">
|
2019-05-15 18:25:30 +00:00
|
|
|
|
<div class="toolbar-item">
|
2020-07-09 20:19:07 +00:00
|
|
|
|
{{#if this.visibleJobs.length}}
|
2020-06-01 19:03:56 +00:00
|
|
|
|
<SearchBox
|
2018-10-30 17:52:54 +00:00
|
|
|
|
data-test-jobs-search
|
2020-07-09 20:19:07 +00:00
|
|
|
|
@searchTerm={{mut this.searchTerm}}
|
|
|
|
|
@onChange={{action this.resetPagination}}
|
2020-06-01 19:03:56 +00:00
|
|
|
|
@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")}}
|
2020-06-01 19:03:56 +00:00
|
|
|
|
<LinkTo @route="jobs.run" data-test-run-job class="button is-primary">Run Job</LinkTo>
|
2020-01-20 20:57:01 +00:00
|
|
|
|
{{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
|
2020-07-09 17:30:11 +00:00
|
|
|
|
type="button"
|
2020-01-30 22:14:04 +00:00
|
|
|
|
>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">
|
2020-06-01 19:03:56 +00:00
|
|
|
|
<MultiSelectDropdown
|
2019-01-24 04:35:51 +00:00
|
|
|
|
data-test-type-facet
|
2020-06-01 19:03:56 +00:00
|
|
|
|
@label="Type"
|
2020-07-09 20:19:07 +00:00
|
|
|
|
@options={{this.optionsType}}
|
|
|
|
|
@selection={{this.selectionType}}
|
|
|
|
|
@onSelect={{action this.setFacetQueryParam "qpType"}} />
|
2020-06-01 19:03:56 +00:00
|
|
|
|
<MultiSelectDropdown
|
2019-01-24 04:35:51 +00:00
|
|
|
|
data-test-status-facet
|
2020-06-01 19:03:56 +00:00
|
|
|
|
@label="Status"
|
2020-07-09 20:19:07 +00:00
|
|
|
|
@options={{this.optionsStatus}}
|
|
|
|
|
@selection={{this.selectionStatus}}
|
|
|
|
|
@onSelect={{action this.setFacetQueryParam "qpStatus"}} />
|
2020-06-01 19:03:56 +00:00
|
|
|
|
<MultiSelectDropdown
|
2019-01-24 04:35:51 +00:00
|
|
|
|
data-test-datacenter-facet
|
2020-06-01 19:03:56 +00:00
|
|
|
|
@label="Datacenter"
|
2020-07-09 20:19:07 +00:00
|
|
|
|
@options={{this.optionsDatacenter}}
|
|
|
|
|
@selection={{this.selectionDatacenter}}
|
|
|
|
|
@onSelect={{action this.setFacetQueryParam "qpDatacenter"}} />
|
2020-06-01 19:03:56 +00:00
|
|
|
|
<MultiSelectDropdown
|
2019-01-24 04:35:51 +00:00
|
|
|
|
data-test-prefix-facet
|
2020-06-01 19:03:56 +00:00
|
|
|
|
@label="Prefix"
|
2020-07-09 20:19:07 +00:00
|
|
|
|
@options={{this.optionsPrefix}}
|
|
|
|
|
@selection={{this.selectionPrefix}}
|
|
|
|
|
@onSelect={{action this.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")}}
|
2020-06-01 19:03:56 +00:00
|
|
|
|
<LinkTo @route="jobs.run" data-test-run-job class="button is-primary">Run Job</LinkTo>
|
2020-01-20 20:57:01 +00:00
|
|
|
|
{{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
|
2020-07-09 17:30:11 +00:00
|
|
|
|
type="button"
|
2020-01-30 22:14:04 +00:00
|
|
|
|
>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>
|
2020-07-09 20:19:07 +00:00
|
|
|
|
{{#if this.sortedJobs}}
|
2020-06-01 19:03:56 +00:00
|
|
|
|
<ListPagination
|
2020-07-09 20:19:07 +00:00
|
|
|
|
@source={{this.sortedJobs}}
|
|
|
|
|
@size={{this.pageSize}}
|
|
|
|
|
@page={{this.currentPage}} as |p|>
|
2020-06-01 19:03:56 +00:00
|
|
|
|
<ListTable
|
|
|
|
|
@source={{p.list}}
|
2020-07-09 20:19:07 +00:00
|
|
|
|
@sortProperty={{this.sortProperty}}
|
|
|
|
|
@sortDescending={{this.sortDescending}}
|
2020-06-01 19:03:56 +00:00
|
|
|
|
@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>
|
2019-10-24 12:05:43 +00:00
|
|
|
|
<th>Groups</th>
|
|
|
|
|
<th class="is-3">Summary</th>
|
2020-06-01 19:03:56 +00:00
|
|
|
|
</t.head>
|
|
|
|
|
<t.body @key="model.id" as |row|>
|
|
|
|
|
<JobRow @data-test-job-row={{row.model.plainId}} @job={{row.model}} @onClick={{action "gotoJob" row.model}} />
|
|
|
|
|
</t.body>
|
|
|
|
|
</ListTable>
|
2019-10-24 12:05:43 +00:00
|
|
|
|
<div class="table-foot">
|
2020-07-09 20:19:07 +00:00
|
|
|
|
<PageSizeSelect @onChange={{action this.resetPagination}} />
|
2019-10-24 12:05:43 +00:00
|
|
|
|
<nav class="pagination">
|
|
|
|
|
<div class="pagination-numbers">
|
2020-07-09 20:19:07 +00:00
|
|
|
|
{{p.startsAt}}–{{p.endsAt}} of {{this.sortedJobs.length}}
|
|
|
|
|
{{#if this.searchTerm}}
|
|
|
|
|
<em>({{dec this.sortedJobs.length this.filteredJobs.length}} hidden by search term)</em>
|
2019-10-24 12:05:43 +00:00
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
2020-06-01 19:03:56 +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>
|
2020-06-01 19:03:56 +00:00
|
|
|
|
</ListPagination>
|
2018-07-25 22:19:43 +00:00
|
|
|
|
{{else}}
|
|
|
|
|
<div data-test-empty-jobs-list class="empty-message">
|
2020-07-09 20:19:07 +00:00
|
|
|
|
{{#if (eq this.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>
|
2020-07-09 20:19:07 +00:00
|
|
|
|
{{else if (eq this.filteredJobs.length 0)}}
|
2019-01-24 04:35:51 +00:00
|
|
|
|
<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>
|
2020-07-09 20:19:07 +00:00
|
|
|
|
{{else if this.searchTerm}}
|
2018-07-25 22:19:43 +00:00
|
|
|
|
<h3 data-test-empty-jobs-list-headline class="empty-message-headline">No Matches</h3>
|
2020-07-09 20:19:07 +00:00
|
|
|
|
<p class="empty-message-body">No jobs match the term <strong>{{this.searchTerm}}</strong></p>
|
2018-07-25 22:19:43 +00:00
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
2019-10-24 12:05:43 +00:00
|
|
|
|
{{/if}}
|
2018-07-25 22:19:43 +00:00
|
|
|
|
{{/if}}
|
|
|
|
|
</section>
|