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