github.com/zoomfoo/nomad@v0.8.5-0.20180907175415-f28fd3a1a056/ui/app/templates/jobs/index.hbs (about)

     1  <section class="section">
     2    {{#if isForbidden}}
     3      {{partial "partials/forbidden-message"}}
     4    {{else}}
     5      <div class="columns">
     6        {{#if filteredJobs.length}}
     7          <div class="column">
     8            {{search-box data-test-jobs-search searchTerm=(mut searchTerm) placeholder="Search jobs..."}}
     9          </div>
    10        {{/if}}
    11        <div class="column is-centered">
    12          {{#link-to "jobs.run" data-test-run-job class="button is-primary is-pulled-right"}}Run Job{{/link-to}}
    13        </div>
    14      </div>
    15      {{#list-pagination
    16        source=sortedJobs
    17        size=pageSize
    18        page=currentPage as |p|}}
    19        {{#list-table
    20          source=p.list
    21          sortProperty=sortProperty
    22          sortDescending=sortDescending
    23          class="with-foot" as |t|}}
    24          {{#t.head}}
    25            {{#t.sort-by prop="name"}}Name{{/t.sort-by}}
    26            {{#t.sort-by prop="status"}}Status{{/t.sort-by}}
    27            {{#t.sort-by prop="type"}}Type{{/t.sort-by}}
    28            {{#t.sort-by prop="priority"}}Priority{{/t.sort-by}}
    29            <th>Groups</th>
    30            <th class="is-3">Summary</th>
    31          {{/t.head}}
    32          {{#t.body key="model.id" as |row|}}
    33            {{job-row data-test-job-row=row.model.plainId job=row.model onClick=(action "gotoJob" row.model)}}
    34          {{/t.body}}
    35        {{/list-table}}
    36        <div class="table-foot">
    37          <nav class="pagination">
    38            <div class="pagination-numbers">
    39              {{p.startsAt}}&ndash;{{p.endsAt}} of {{sortedJobs.length}}
    40              {{#if searchTerm}}
    41                <em>({{dec sortedJobs.length filteredJobs.length}} hidden by search term)</em>
    42              {{/if}}
    43            </div>
    44            {{#p.prev class="pagination-previous"}} &lt; {{/p.prev}}
    45            {{#p.next class="pagination-next"}} &gt; {{/p.next}}
    46            <ul class="pagination-list"></ul>
    47          </nav>
    48        </div>
    49      {{else}}
    50        <div data-test-empty-jobs-list class="empty-message">
    51          {{#if (eq filteredJobs.length 0)}}
    52            <h3 data-test-empty-jobs-list-headline class="empty-message-headline">No Jobs</h3>
    53            <p class="empty-message-body">
    54              The cluster is currently empty.
    55            </p>
    56          {{else if searchTerm}}
    57            <h3 data-test-empty-jobs-list-headline class="empty-message-headline">No Matches</h3>
    58            <p class="empty-message-body">No jobs match the term <strong>{{searchTerm}}</strong></p>
    59          {{/if}}
    60        </div>
    61      {{/list-pagination}}
    62    {{/if}}
    63  </section>