1
|
<app-nav-bar></app-nav-bar>
|
2
|
<div>
|
3
|
<p-treeTable [value]="files" [columns]="cols">
|
4
|
<ng-template pTemplate="caption">
|
5
|
Units and sensors
|
6
|
</ng-template>
|
7
|
<ng-template pTemplate="header" let-columns>
|
8
|
<tr>
|
9
|
<th *ngFor="let col of columns">
|
10
|
{{col.header}}
|
11
|
</th>
|
12
|
<th style="width: 8rem">
|
13
|
<p-button icon="pi pi-cog"></p-button>
|
14
|
</th>
|
15
|
</tr>
|
16
|
</ng-template>
|
17
|
<ng-template pTemplate="body" let-rowNode let-rowData="rowData" let-columns="columns">
|
18
|
<tr>
|
19
|
<td *ngFor="let col of columns; let i = index">
|
20
|
<p-treeTableToggler [rowNode]="rowNode" *ngIf="i == 0"></p-treeTableToggler>
|
21
|
{{rowData[col.field]}}
|
22
|
</td>
|
23
|
<td>
|
24
|
<p-button (onClick)="openDialog()" icon="pi pi-pencil" styleClass="p-button-warning" [style]="{'margin-right': '.5em'}"></p-button>
|
25
|
</td>
|
26
|
</tr>
|
27
|
</ng-template>
|
28
|
<ng-template pTemplate="summary">
|
29
|
<div style="text-align:left">
|
30
|
<p-button icon="pi pi-refresh"></p-button>
|
31
|
</div>
|
32
|
</ng-template>
|
33
|
</p-treeTable>
|
34
|
</div>
|