All files / src/app/components/signals-table signals-table.component.html

97.26% Statements 71/73
100% Branches 4/4
80% Functions 4/5
100% Lines 31/31

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 47876x 1752x     622x       14x 14x 14x   14x 1244x 2x 2x 2x 2x 2x 14x   1258x     14x         14x 14x 14x 14x 14x 14x   14x 7166x 14987x 7166x 14987x 14987x 14987x 655x   14x  
<div class="skeleton-block" *ngIf="!signals"></div>
<p-table *ngIf="signals" #signals_table [value]="signals.items" [tableStyle]="{ 'min-width': '50rem' }" [paginator]="true" [rows]="rows"
  [rowsPerPageOptions]="filteredRowsPerPageOptions" [showCurrentPageReport]="true" [first]="offset" [totalRecords]="signals.total"
  currentPageReportTemplate="{first} - {last} of {totalRecords} signals" [rowHover]="true" [lazy]="true"
  [globalFilterFields]="['ticker']" (onPage)="onTableEvent($event)" (onLazyLoad)="loadEvents($event)">
  <ng-template pTemplate="caption">
 
    <div class="columns">
      <div class="column">
        Signals
      </div>
      <div class="column is-flex is-justify-content-right">
        <span>
          <button class="button" (click)="clearFilter()" *ngIf="searchValue && searchValue.length>0">
            <span class="icon is-small center">
              <i class="iconoir-xmark-circle"></i>
            </span>
            <span>Clear filter</span>
          </button>
        </span>
        <span>
          <input class="input" type="text" (input)="applyFilterGlobal($event)" placeholder="Filter" [(ngModel)]="searchValue"/>
        </span>
      </div>
    </div>
 
  </ng-template>
  <ng-template pTemplate="header">
    <tr>
      <th pSortableColumn="signal_id">Ticker <p-sortIcon field="signal_id"></p-sortIcon></th>
      <th pSortableColumn="status">Status <p-sortIcon field="status"></p-sortIcon></th>
      <th pSortableColumn="unit">Unit <p-sortIcon field="unit"></p-sortIcon></th>
      <th pSortableColumn="type">Type <p-sortIcon field="type"></p-sortIcon></th>
      <th pSortableColumn="frequency">Frequency <p-sortIcon field="frequency"></p-sortIcon></th>
    </tr>
  </ng-template>
  <ng-template pTemplate="body" let-signal>
    <tr [routerLink]="['/signals', signal.signal_id]">
      <td>{{ signal.ticker }}</td>
      <td><p-tag [value]="signal.status.status" [severity]="getSeverity(signal.status.status)"></p-tag></td>
      <td>{{ signal.unit }}</td>
      <td>{{ signal.type }}</td>
      <td>{{ signal.frequency }}</td>
    </tr>
  </ng-template>
</p-table>