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

97.22% Statements 70/72
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 47497x 994x     342x       10x 10x 10x   10x 684x 2x 2x 2x 2x 2x 10x   694x     10x         10x 10x 10x 10x 10x 10x   10x 3292x 6935x 3292x 6935x 6935x 6935x 351x   10x  
<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="ticker">Ticker <p-sortIcon field="ticker"></p-sortIcon></th>
      <th>Status</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>