github.com/blixtra/nomad@v0.7.2-0.20171221000451-da9a1d7bb050/ui/app/templates/jobs/index.hbs (about)

     1  {{#global-header class="page-header"}}
     2    Jobs
     3  {{/global-header}}
     4  {{#gutter-menu class="page-body" onNamespaceChange=(action "refresh")}}
     5    <section class="section">
     6      {{#if isForbidden}}
     7        {{partial "partials/forbidden-message"}}
     8      {{else}}
     9        {{#if filteredJobs.length}}
    10          <div class="content">
    11            <div>{{search-box searchTerm=(mut searchTerm) placeholder="Search jobs..."}}</div>
    12          </div>
    13        {{/if}}
    14        {{#list-pagination
    15          source=sortedJobs
    16          size=pageSize
    17          page=currentPage 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              {{#t.sort-by prop="name"}}Name{{/t.sort-by}}
    25              {{#t.sort-by prop="status"}}Status{{/t.sort-by}}
    26              {{#t.sort-by prop="type"}}Type{{/t.sort-by}}
    27              {{#t.sort-by prop="priority"}}Priority{{/t.sort-by}}
    28              <th>Groups</th>
    29              <th class="is-3">Allocation Status</th>
    30            {{/t.head}}
    31            {{#t.body key="model.id" as |row|}}
    32              {{job-row job=row.model onClick=(action "gotoJob" row.model)}}
    33            {{/t.body}}
    34          {{/list-table}}
    35          <div class="table-foot">
    36            <nav class="pagination">
    37              <div class="pagination-numbers">
    38                {{p.startsAt}}&ndash;{{p.endsAt}} of {{sortedJobs.length}}
    39              </div>
    40              {{#p.prev class="pagination-previous"}} &lt; {{/p.prev}}
    41              {{#p.next class="pagination-next"}} &gt; {{/p.next}}
    42              <ul class="pagination-list"></ul>
    43            </nav>
    44          </div>
    45        {{else}}
    46          <div class="empty-message">
    47            {{#if (eq filteredJobs.length 0)}}
    48              <h3 class="empty-message-headline">No Jobs</h3>
    49              <p class="empty-message-body">
    50                The cluster is currently empty.
    51              </p>
    52            {{else if searchTerm}}
    53              <h3 class="empty-message-headline">No Matches</h3>
    54              <p class="empty-message-body">No jobs match the term <strong>{{searchTerm}}</strong></p>
    55            {{/if}}
    56          </div>
    57        {{/list-pagination}}
    58      {{/if}}
    59    </section>
    60  {{/gutter-menu}}