github.com/manicqin/nomad@v0.9.5/ui/app/templates/jobs/job/allocations.hbs (about)

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