github.com/hernad/nomad@v1.6.112/ui/app/templates/components/job-page/parts/children.hbs (about)

     1  {{!
     2    Copyright (c) HashiCorp, Inc.
     3    SPDX-License-Identifier: MPL-2.0
     4  ~}}
     5  
     6  <div class="boxed-section-head">
     7    Job Launches
     8    {{#if this.job.parameterized}}
     9      {{#if (can "dispatch job" namespace=this.job.namespace)}}
    10        <LinkTo
    11          data-test-dispatch-button
    12          @route="jobs.job.dispatch"
    13          class="button is-primary is-compact pull-right"
    14        >
    15          Dispatch Job
    16        </LinkTo>
    17      {{else}}
    18        <button
    19          data-test-dispatch-button
    20          class="button is-disabled is-primary is-compact pull-right tooltip multiline"
    21          aria-label="You don’t have permission to dispatch jobs"
    22          disabled
    23          type="button"
    24        >
    25          Dispatch Job
    26        </button>
    27      {{/if}}
    28    {{/if}}
    29  </div>
    30  <div
    31    class="boxed-section-body {{if this.sortedChildren.length "is-full-bleed"}}"
    32  >
    33    {{#if this.sortedChildren}}
    34      <ListPagination
    35        @source={{this.sortedChildren}}
    36        @size={{this.pageSize}}
    37        @page={{this.currentPage}} as |p|
    38      >
    39        <ListTable
    40          @source={{p.list}}
    41          @sortProperty={{this.sortProperty}}
    42          @sortDescending={{this.sortDescending}}
    43          @class="with-foot" as |t|
    44        >
    45          <t.head data-test-jobs-header>
    46            <t.sort-by @prop="name">
    47              Name
    48            </t.sort-by>
    49            <t.sort-by @prop="submitTime" data-test-jobs-submit-time-header>
    50              Submitted At
    51            </t.sort-by>
    52            <t.sort-by @prop="status">
    53              Status
    54            </t.sort-by>
    55            <th>
    56              Groups
    57            </th>
    58            <th class="is-3">
    59              Summary
    60            </th>
    61          </t.head>
    62          <t.body @key="model.id" as |row|>
    63            <JobRow data-test-job-row @job={{row.model}} @context="child" />
    64          </t.body>
    65        </ListTable>
    66        <div class="table-foot">
    67          <PageSizeSelect @onChange={{action this.resetPagination}} />
    68          <nav class="pagination">
    69            <div class="pagination-numbers">
    70              {{p.startsAt}}
    71              –
    72              {{p.endsAt}}
    73              of
    74              {{this.sortedChildren.length}}
    75            </div>
    76            <p.prev @class="pagination-previous">
    77              {{x-icon "chevron-left"}}
    78            </p.prev>
    79            <p.next @class="pagination-next">
    80              {{x-icon "chevron-right"}}
    81            </p.next>
    82            <ul class="pagination-list"></ul>
    83          </nav>
    84        </div>
    85      </ListPagination>
    86    {{else}}
    87      <div class="empty-message">
    88        <h3 class="empty-message-headline">
    89          No Job Launches
    90        </h3>
    91        <p class="empty-message-body">
    92          No remaining living job launches.
    93        </p>
    94      </div>
    95    {{/if}}
    96  </div>