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

92.75% Statements 64/69
75% Branches 6/8
50% Functions 3/6
100% Lines 35/35

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 51 52 53 54 55 56481x   2x 2x   2x 962x 6x 2x 962x   2x             2x 2x 962x 2892x 6x 2x 2x   2x       226x 5x 5x 457x 5x 5x 457x 5x   452x 1356x 1356x 15x     452x   5x   2x   962x 962x   2x  
<p-table showGridlines [value]="rows" [columns]="selectedColumns" [reorderableColumns]="true" [tableStyle]="{ 'min-width': '60rem' }" (onRowReorder)="onRowReorder($event)">
    <ng-template #caption>
        <div class="toolbar">
            <app-multi-select-signals/>
            <div class="toolbar-element">
                <app-refresh-rate-selector
                    [isResponseSlowerThanRefresh]="isResponseSlowerThanRefresh"
                    (selectionChanged)="handleRefreshRateChange($event)">
                </app-refresh-rate-selector>
                <p-multiselect display="chip" [options]="columns" [(ngModel)]="selectedColumns" optionLabel="label" selectedItemsLabel="{0} columns selected" [style]="{ 'min-width': '200px' }" placeholder="Choose Columns" />
            </div>
        </div>
 
 
 
    </ng-template>
    <ng-template #header let-columns>
        <tr>
            <th>Device</th>
            <th>Signal</th>
            <th *ngFor="let col of selectedColumns" pReorderableColumn>
                {{col.label}}
            </th>
            <th></th>
        </tr>
    </ng-template>
    <ng-template #body
        let-row
        let-columns="columns"
        let-index="rowIndex">
        <tr [pReorderableRow]="index">
            <td>
                <span class="pi pi-bars" pReorderableRowHandle></span>
                {{ row.signal.device?.name ?? row.signal.signal_id.split('.')[0] }}
            </td>
            <td>
                {{ row.signal.signal_id.split('.')[1] }}
            </td>
 
            <td *ngFor="let column of columns" >
                <ng-container *ngIf="column.onSample && row.sample !==undefined">{{row.sample[column.field]}}</ng-container>
                <ng-container *ngIf="!column.onSample">{{row.signal[column.field]}}</ng-container>
            </td>
 
            <td>
                <i class="pi pi-eye open-icon" aria-hidden="true" (click)="showSignal(row.signal)" [id]="row.signal.signal_id"></i>
            </td>
        </tr>
    </ng-template>
</p-table>
 
<p-dialog class="signal-card-dialog" header="Signal details" [modal]="true" [(visible)]="signalDialogVisible" (onHide)="hideSignal()">
    <div class="card-container"><app-signal-card *ngIf="selectedSignal" [signalId]="selectedSignal.signal_id"></app-signal-card></div>
 
</p-dialog>