1
|
<app-nav-bar></app-nav-bar>
|
2
|
|
3
|
<div class="container dashboard">
|
4
|
<p-accordion>
|
5
|
<p-accordionTab *ngFor="let unit of units">
|
6
|
<p-header [className]="'dashboard-unit-wrapper'">
|
7
|
<div [className]="'row dashboard-unit'">
|
8
|
<div class="col-md-6">{{ unit.unit.description}}</div>
|
9
|
<div class="col-md-6 text-right">
|
10
|
<p-button label="Sensors graph" icon="pi pi-chart-line" [routerLink]="['/dashboard/unit', unit.unit.unitId]"></p-button>
|
11
|
<p-button label="Add sensor" icon="pi pi-cog" (onClick)="editUnit($event, unit.unit)"></p-button>
|
12
|
<p-button label="Edit unit" icon="pi pi-cog" (onClick)="editUnit($event, unit.unit)"></p-button>
|
13
|
</div>
|
14
|
</div>
|
15
|
</p-header>
|
16
|
<div>
|
17
|
<app-sensors *ngFor="let sensor of unit.sensors" [sensor]="sensor" [unitId]="unit.unit.unitId"></app-sensors>
|
18
|
</div>
|
19
|
</p-accordionTab>
|
20
|
</p-accordion>
|
21
|
</div>
|
22
|
|
23
|
<app-unit-popup [(isVisible)]="showUnitPopup" [unit]="editedUnit"></app-unit-popup>
|