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 47645x 1290x     370x       9x 9x 9x   9x 740x 2x 2x 2x 2x 2x 9x   749x     9x         9x 9x 9x 9x 9x 9x   9x 3386x 7105x 3386x 7105x 7105x 7105x 333x   9x  
<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)="clear(signals_table)" *ngIf="searchValue && searchValue.length>0">
            <span class="icon is-small">
              <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>