2018-06-07 06:24:55 +00:00
|
|
|
<h1>Targets</h1>
|
2018-06-07 09:21:56 +00:00
|
|
|
<div *ngIf="!targetPage; else content">
|
|
|
|
No data
|
|
|
|
</div>
|
2018-04-17 09:40:42 +00:00
|
|
|
|
2018-06-07 09:21:56 +00:00
|
|
|
<ng-template #content>
|
|
|
|
<p-table [value]="targetPage.content" selectionMode="single" (onRowSelect)="onRowSelect($event)" [resizableColumns]="true" >
|
2018-06-07 06:24:55 +00:00
|
|
|
<ng-template pTemplate="header">
|
|
|
|
<tr>
|
|
|
|
<th style="width: 4em">No.</th>
|
|
|
|
<th style="width: 8em">Status</th>
|
2018-06-07 06:30:15 +00:00
|
|
|
<th style="width: 15em">Type</th>
|
2018-06-07 06:24:55 +00:00
|
|
|
<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">
|
2018-06-11 13:31:42 +00:00
|
|
|
<td>{{(rowIndex + 1) + ((pageIdx - 1) * countPerPage)}}</td>
|
2018-06-07 06:30:15 +00:00
|
|
|
<td></td>
|
|
|
|
<td>{{target.infra.metaInfraType.name}}</td>
|
2018-06-07 06:24:55 +00:00
|
|
|
<td>{{target.displayName}}</td>
|
|
|
|
<td>{{target.sensorCount}}</td>
|
2018-06-07 06:30:15 +00:00
|
|
|
<td>{{target.createDate | date: 'yyyy-MM-dd'}}</td>
|
2018-06-07 06:24:55 +00:00
|
|
|
<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>
|
2018-06-11 13:31:42 +00:00
|
|
|
<p-paginator #paginator [rows]="targetPage.size" [totalRecords]="targetPage.totalElements" [first]="pageIdx "
|
2018-06-11 11:28:05 +00:00
|
|
|
(onPageChange)="onPaginate($event)"></p-paginator>
|
|
|
|
|
2018-06-07 09:21:56 +00:00
|
|
|
</ng-template>
|
|
|
|
|