2018-06-07 06:24:55 +00:00
|
|
|
<h1>Targets</h1>
|
2018-04-17 09:40:42 +00:00
|
|
|
|
2018-06-07 06:24:55 +00:00
|
|
|
<p-table [value]="page.content" selectionMode="single" (onRowSelect)="onRowSelect($event)" [resizableColumns]="true" >
|
|
|
|
<ng-template pTemplate="header">
|
|
|
|
<tr>
|
|
|
|
<th style="width: 4em">No.</th>
|
|
|
|
<th style="width: 8em">Status</th>
|
|
|
|
<th style="width: 8em">Type</th>
|
|
|
|
<th>Name</th>
|
|
|
|
<th style="width: 15em">Sensors</th>
|
|
|
|
<th style="width: 8em">Created at</th>
|
|
|
|
<th style="width: 10em"></th>
|
|
|
|
</tr>
|
|
|
|
</ng-template>
|
|
|
|
<ng-template pTemplate="body" let-target let-rowIndex="rowIndex">
|
|
|
|
<tr [pSelectableRow]="target">
|
|
|
|
<td>{{rowIndex + 1}}</td>
|
|
|
|
<td>??</td>
|
|
|
|
<td>{{target.infra.id}}</td>
|
|
|
|
<td>{{target.displayName}}</td>
|
|
|
|
<td>{{target.sensorCount}}</td>
|
|
|
|
<td>{{target.createDate | date: 'dd.MM.yyyy'}}</td>
|
|
|
|
<td>
|
|
|
|
<button type="button" label="Add Sensor" icon="ui-icon-add" pButton class="ui-s-button" (click)="onAddSensor(target)"></button>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</ng-template>
|
|
|
|
</p-table>
|
|
|
|
<p-paginator #paginator [rows]="page.size" [totalRecords]="page.totalElements"
|
|
|
|
(onPageChange)="onPaginate($event)" ></p-paginator>
|