2022-02-16 14:02:06 +00:00
|
|
|
|
{{page-title "Jobs"}}
|
2018-07-25 22:19:43 +00:00
|
|
|
|
<section class="section">
|
2021-04-29 20:00:59 +00:00
|
|
|
|
<div class="toolbar">
|
|
|
|
|
<div class="toolbar-item">
|
|
|
|
|
{{#if this.visibleJobs.length}}
|
|
|
|
|
<SearchBox
|
|
|
|
|
data-test-jobs-search
|
|
|
|
|
@searchTerm={{mut this.searchTerm}}
|
|
|
|
|
@onChange={{action this.resetPagination}}
|
2022-01-03 17:08:07 +00:00
|
|
|
|
@placeholder="Search jobs..."
|
|
|
|
|
/>
|
2021-04-29 20:00:59 +00:00
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
|
|
|
|
{{#if (media "isMobile")}}
|
|
|
|
|
<div class="toolbar-item is-right-aligned">
|
2021-07-13 12:20:41 +00:00
|
|
|
|
{{#if (can "run job" namespace=this.qpNamespace)}}
|
2022-01-03 17:08:07 +00:00
|
|
|
|
<LinkTo
|
|
|
|
|
@route="jobs.run"
|
|
|
|
|
@query={{hash namespace=this.qpNamespace}}
|
|
|
|
|
data-test-run-job
|
|
|
|
|
class="button is-primary"
|
|
|
|
|
>
|
|
|
|
|
Run Job
|
|
|
|
|
</LinkTo>
|
2021-04-29 20:00:59 +00:00
|
|
|
|
{{else}}
|
|
|
|
|
<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
|
|
|
|
|
type="button"
|
2022-01-03 17:08:07 +00:00
|
|
|
|
>
|
|
|
|
|
Run Job
|
|
|
|
|
</button>
|
2019-05-15 18:25:30 +00:00
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
2021-04-29 20:00:59 +00:00
|
|
|
|
{{/if}}
|
|
|
|
|
<div class="toolbar-item is-right-aligned is-mobile-full-width">
|
|
|
|
|
<div class="button-bar">
|
|
|
|
|
{{#if this.system.shouldShowNamespaces}}
|
|
|
|
|
<SingleSelectDropdown
|
|
|
|
|
data-test-namespace-facet
|
|
|
|
|
@label="Namespace"
|
|
|
|
|
@options={{this.optionsNamespaces}}
|
|
|
|
|
@selection={{this.qpNamespace}}
|
2022-07-11 22:06:18 +00:00
|
|
|
|
@onSelect={{action this.setFacetQueryParam "qpNamespace"}}
|
2022-01-03 17:08:07 +00:00
|
|
|
|
/>
|
2021-04-29 20:00:59 +00:00
|
|
|
|
{{/if}}
|
|
|
|
|
<MultiSelectDropdown
|
|
|
|
|
data-test-type-facet
|
|
|
|
|
@label="Type"
|
|
|
|
|
@options={{this.optionsType}}
|
|
|
|
|
@selection={{this.selectionType}}
|
2022-01-03 17:08:07 +00:00
|
|
|
|
@onSelect={{action this.setFacetQueryParam "qpType"}}
|
|
|
|
|
/>
|
2021-04-29 20:00:59 +00:00
|
|
|
|
<MultiSelectDropdown
|
|
|
|
|
data-test-status-facet
|
|
|
|
|
@label="Status"
|
|
|
|
|
@options={{this.optionsStatus}}
|
|
|
|
|
@selection={{this.selectionStatus}}
|
2022-01-03 17:08:07 +00:00
|
|
|
|
@onSelect={{action this.setFacetQueryParam "qpStatus"}}
|
|
|
|
|
/>
|
2021-04-29 20:00:59 +00:00
|
|
|
|
<MultiSelectDropdown
|
|
|
|
|
data-test-datacenter-facet
|
|
|
|
|
@label="Datacenter"
|
|
|
|
|
@options={{this.optionsDatacenter}}
|
|
|
|
|
@selection={{this.selectionDatacenter}}
|
2022-01-03 17:08:07 +00:00
|
|
|
|
@onSelect={{action this.setFacetQueryParam "qpDatacenter"}}
|
|
|
|
|
/>
|
2021-04-29 20:00:59 +00:00
|
|
|
|
<MultiSelectDropdown
|
|
|
|
|
data-test-prefix-facet
|
|
|
|
|
@label="Prefix"
|
|
|
|
|
@options={{this.optionsPrefix}}
|
|
|
|
|
@selection={{this.selectionPrefix}}
|
2022-01-03 17:08:07 +00:00
|
|
|
|
@onSelect={{action this.setFacetQueryParam "qpPrefix"}}
|
|
|
|
|
/>
|
2019-01-17 00:29:31 +00:00
|
|
|
|
</div>
|
2018-08-14 19:54:54 +00:00
|
|
|
|
</div>
|
2021-04-29 20:00:59 +00:00
|
|
|
|
{{#if (not (media "isMobile"))}}
|
|
|
|
|
<div class="toolbar-item is-right-aligned">
|
2021-07-13 12:20:41 +00:00
|
|
|
|
{{#if (can "run job" namespace=this.qpNamespace)}}
|
2022-01-03 17:08:07 +00:00
|
|
|
|
<LinkTo
|
|
|
|
|
@route="jobs.run"
|
|
|
|
|
@query={{hash namespace=this.qpNamespace}}
|
|
|
|
|
data-test-run-job
|
|
|
|
|
class="button is-primary"
|
|
|
|
|
>
|
|
|
|
|
Run Job
|
|
|
|
|
</LinkTo>
|
2021-04-29 20:00:59 +00:00
|
|
|
|
{{else}}
|
|
|
|
|
<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
|
|
|
|
|
type="button"
|
2022-01-03 17:08:07 +00:00
|
|
|
|
>
|
|
|
|
|
Run Job
|
|
|
|
|
</button>
|
2021-04-29 20:00:59 +00:00
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
|
|
|
|
{{#if this.isForbidden}}
|
|
|
|
|
<ForbiddenMessage />
|
2022-01-03 17:08:07 +00:00
|
|
|
|
{{else if this.sortedJobs}}
|
|
|
|
|
<ListPagination
|
|
|
|
|
@source={{this.sortedJobs}}
|
|
|
|
|
@size={{this.pageSize}}
|
2022-02-16 14:02:06 +00:00
|
|
|
|
@page={{this.currentPage}}
|
|
|
|
|
as |p|
|
2022-01-03 17:08:07 +00:00
|
|
|
|
>
|
|
|
|
|
<ListTable
|
|
|
|
|
@source={{p.list}}
|
|
|
|
|
@sortProperty={{this.sortProperty}}
|
|
|
|
|
@sortDescending={{this.sortDescending}}
|
2022-02-16 14:02:06 +00:00
|
|
|
|
@class="with-foot"
|
|
|
|
|
as |t|
|
2022-01-03 17:08:07 +00:00
|
|
|
|
>
|
|
|
|
|
<t.head>
|
|
|
|
|
<t.sort-by @prop="name">
|
|
|
|
|
Name
|
|
|
|
|
</t.sort-by>
|
|
|
|
|
{{#if this.system.shouldShowNamespaces}}
|
|
|
|
|
<t.sort-by @prop="namespace.name">
|
|
|
|
|
Namespace
|
|
|
|
|
</t.sort-by>
|
|
|
|
|
{{/if}}
|
|
|
|
|
<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|>
|
|
|
|
|
<JobRow @data-test-job-row={{row.model.plainId}} @job={{row.model}} />
|
|
|
|
|
</t.body>
|
|
|
|
|
</ListTable>
|
|
|
|
|
<div class="table-foot">
|
|
|
|
|
<PageSizeSelect @onChange={{action this.resetPagination}} />
|
|
|
|
|
<nav class="pagination">
|
|
|
|
|
<div class="pagination-numbers">
|
|
|
|
|
{{p.startsAt}}
|
|
|
|
|
–
|
|
|
|
|
{{p.endsAt}}
|
|
|
|
|
of
|
|
|
|
|
{{this.sortedJobs.length}}
|
|
|
|
|
{{#if this.searchTerm}}
|
|
|
|
|
<em>
|
|
|
|
|
(
|
|
|
|
|
{{dec this.sortedJobs.length this.filteredJobs.length}}
|
|
|
|
|
hidden by search term)
|
|
|
|
|
</em>
|
2021-04-29 20:00:59 +00:00
|
|
|
|
{{/if}}
|
2022-01-03 17:08:07 +00:00
|
|
|
|
</div>
|
|
|
|
|
<p.prev @class="pagination-previous">
|
|
|
|
|
{{x-icon "chevron-left"}}
|
|
|
|
|
</p.prev>
|
|
|
|
|
<p.next @class="pagination-next">
|
|
|
|
|
{{x-icon "chevron-right"}}
|
|
|
|
|
</p.next>
|
|
|
|
|
<ul class="pagination-list"></ul>
|
|
|
|
|
</nav>
|
2018-07-25 22:19:43 +00:00
|
|
|
|
</div>
|
2022-01-03 17:08:07 +00:00
|
|
|
|
</ListPagination>
|
|
|
|
|
{{else}}
|
|
|
|
|
<div data-test-empty-jobs-list class="empty-message">
|
|
|
|
|
{{#if (eq this.visibleJobs.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 (eq this.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>
|
|
|
|
|
{{else if this.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>
|
|
|
|
|
{{this.searchTerm}}
|
|
|
|
|
</strong>
|
|
|
|
|
</p>
|
|
|
|
|
{{/if}}
|
|
|
|
|
</div>
|
2018-07-25 22:19:43 +00:00
|
|
|
|
{{/if}}
|
2022-02-16 14:02:06 +00:00
|
|
|
|
</section>
|