github.com/ferranbt/nomad@v0.9.3-0.20190607002617-85c449b7667c/ui/app/templates/jobs/job/allocations.hbs (about)

     1  {{partial "jobs/job/subnav"}}
     2  <section class="section">
     3    {{#if allocations.length}}
     4      <div class="content">
     5        <div>
     6          {{search-box
     7            data-test-allocations-search
     8            searchTerm=(mut searchTerm)
     9            onChange=(action resetPagination)
    10            placeholder="Search allocations..."}}
    11        </div>
    12      </div>
    13      {{#list-pagination
    14        source=sortedAllocations
    15        size=pageSize
    16        page=currentPage
    17        class="allocations" as |p|}}
    18        {{#list-table
    19          source=p.list
    20          sortProperty=sortProperty
    21          sortDescending=sortDescending
    22          class="with-foot" as |t|}}
    23          {{#t.head}}
    24            <th class="is-narrow"></th>
    25            {{#t.sort-by prop="shortId"}}ID{{/t.sort-by}}
    26            {{#t.sort-by prop="taskGroupName"}}Task Group{{/t.sort-by}}
    27            {{#t.sort-by prop="createIndex" title="Create Index"}}Created{{/t.sort-by}}
    28            {{#t.sort-by prop="modifyIndex" title="Modify Index"}}Modified{{/t.sort-by}}
    29            {{#t.sort-by prop="statusIndex"}}Status{{/t.sort-by}}
    30            {{#t.sort-by prop="jobVersion"}}Version{{/t.sort-by}}
    31            {{#t.sort-by prop="node.shortId"}}Client{{/t.sort-by}}
    32            <th>CPU</th>
    33            <th>Memory</th>
    34          {{/t.head}}
    35          {{#t.body as |row|}}
    36            {{allocation-row
    37              data-test-allocation=row.model.id
    38              allocation=row.model
    39              context="job"
    40              onClick=(action "gotoAllocation" row.model)}}
    41          {{/t.body}}
    42        {{/list-table}}
    43        <div class="table-foot">
    44          <nav class="pagination">
    45            <div class="pagination-numbers">
    46              {{p.startsAt}}&ndash;{{p.endsAt}} of {{sortedAllocations.length}}
    47            </div>
    48            {{#p.prev class="pagination-previous"}} &lt; {{/p.prev}}
    49            {{#p.next class="pagination-next"}} &gt; {{/p.next}}
    50            <ul class="pagination-list"></ul>
    51          </nav>
    52        </div>
    53      {{else}}
    54        <div class="boxed-section-body">
    55          <div class="empty-message" data-test-empty-allocations-list>
    56            <h3 class="empty-message-headline" data-test-empty-allocations-list-headline>No Matches</h3>
    57            <p class="empty-message-body">No allocations match the term <strong>{{searchTerm}}</strong></p>
    58          </div>
    59        </div>
    60      {{/list-pagination}}
    61    {{else}}
    62      <div class="boxed-section-body">
    63        <div class="empty-message" data-test-empty-allocations-list>
    64          <h3 class="empty-message-headline" data-test-empty-allocations-list-headline>No Allocations</h3>
    65          <p class="empty-message-body">No allocations have been placed.</p>
    66        </div>
    67      </div>
    68    {{/if}}
    69  </section>