All files / src/app/components/device-states device-states.component.html

95.45% Statements 42/44
100% Branches 0/0
50% Functions 1/2
100% Lines 23/23

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50    85x 85x   1x   2x 84x                     2x 1x   16x       1x 1x   1x         1x 1x 1x 1x 1x   1x   340x 340x 340x 340x 20x   1x  
<div>
  <section class="section">
    <h1>{{ deviceName }}</h1>
    <h2 class="subtitle is-5">device #{{ deviceId.slice(8) }}</h2>
  </section>
</div>
 
<p-table
  *ngIf="versions"
  [value]="versions.items"
  [tableStyle]="{ 'min-width': '50rem' }"
  [paginator]="true"
  [rows]="rows"
  [rowsPerPageOptions]="filteredRowsPerPageOptions"
  [showCurrentPageReport]="true"
  [first]="offset"
  [totalRecords]="versions.total"
  [lazy] = true
  currentPageReportTemplate="Showing {first} - {last} of {totalRecords} entries"
  (onPage)="onTableEvent($event)"
  (onLazyLoad)="loadEvents($event)"
  sortField="timestamp"
  [sortOrder]="-1">
  <ng-template pTemplate="caption">
 
    <div class="columns">
      <div class="column">
        Last changes
      </div>
    </div>
 
  </ng-template>
  <ng-template pTemplate="header">
    <tr>
      <th pSortableColumn="timestamp">Date <p-sortIcon field="timestamp"></p-sortIcon></th>
      <th>Mode ID</th>
      <th>Load</th>
      <th>Tokens</th>
    </tr>
  </ng-template>
  <ng-template pTemplate="body" let-version>
    <tr>
      <td>{{ version.timestamp * 1000 | date:'yyyy/MM/dd - HH:mm:ss' }}</td>
      <td>{{ version.mode_id }}</td>
      <td>{{ version.load }}</td>
      <td>{{ version.tokens }}</td>
    </tr>
  </ng-template>
</p-table>