dev smartfarming #1
|
|
@ -5,7 +5,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button [ngClass]="{'active-button': selectedButton === 'dht'}" (click)="selectSensor('dht')">BHT</button>
|
<button [ngClass]="{'active-button': selectedButton === 'dht'}" (click)="selectSensor('dht')">DHT</button>
|
||||||
<button [ngClass]="{'active-button': selectedButton === 'npk1'}" (click)="selectSensor('npk1')">NPK 1</button>
|
<button [ngClass]="{'active-button': selectedButton === 'npk1'}" (click)="selectSensor('npk1')">NPK 1</button>
|
||||||
<button [ngClass]="{'active-button': selectedButton === 'npk2'}" (click)="selectSensor('npk2')">NPK 2</button>
|
<button [ngClass]="{'active-button': selectedButton === 'npk2'}" (click)="selectSensor('npk2')">NPK 2</button>
|
||||||
<button [ngClass]="{'active-button': selectedButton === 'relay'}" (click)="selectSensor('relay')">Relay</button>
|
<button [ngClass]="{'active-button': selectedButton === 'relay'}" (click)="selectSensor('relay')">Relay</button>
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
<div class="sensor-wrapper">
|
<div class="sensor-wrapper">
|
||||||
<div class="title">Sensor BHT</div>
|
<div class="title">Sensor DHT</div>
|
||||||
<ng-container *ngIf="isLoadingDHT; else dhtData">
|
<ng-container *ngIf="isLoadingDHT; else dhtData">
|
||||||
<div class="d-flex align-items-center" style="padding: 50px 0px 50px 0px">
|
<div class="d-flex align-items-center" style="padding: 50px 0px 50px 0px">
|
||||||
<i class="fa fa-spinner fa-spin"></i>
|
<i class="fa fa-spinner fa-spin"></i>
|
||||||
|
|
@ -34,7 +34,10 @@
|
||||||
<div class="title">Sensor NPK 1</div>
|
<div class="title">Sensor NPK 1</div>
|
||||||
<select class="form-select" style="margin-top: 10px" [(ngModel)]="selectedNPK1" (change)="onResize()">
|
<select class="form-select" style="margin-top: 10px" [(ngModel)]="selectedNPK1" (change)="onResize()">
|
||||||
<option value="npk">NPK</option>
|
<option value="npk">NPK</option>
|
||||||
<option value="others">Lainnya</option>
|
<option value="temperature">Temperatur Tanah</option>
|
||||||
|
<option value="humidity">Kelembaban Tanah</option>
|
||||||
|
<option value="ph">PH Tanah</option>
|
||||||
|
<option value="conductivity">Conductivity</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<ng-container *ngIf="isLoadingNPK1; else npk1Data">
|
<ng-container *ngIf="isLoadingNPK1; else npk1Data">
|
||||||
|
|
@ -53,7 +56,10 @@
|
||||||
<div class="title">Sensor NPK 2</div>
|
<div class="title">Sensor NPK 2</div>
|
||||||
<select class="form-select" style="margin-top: 10px" [(ngModel)]="selectedNPK2" (change)=" onResize()">
|
<select class="form-select" style="margin-top: 10px" [(ngModel)]="selectedNPK2" (change)=" onResize()">
|
||||||
<option value="npk">NPK</option>
|
<option value="npk">NPK</option>
|
||||||
<option value="others">Lainnya</option>
|
<option value="temperature">Temperatur Tanah</option>
|
||||||
|
<option value="humidity">Kelembaban Tanah</option>
|
||||||
|
<option value="ph">PH Tanah</option>
|
||||||
|
<option value="conductivity">Conductivity</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<ng-container *ngIf="isLoadingNPK2; else npk2Data">
|
<ng-container *ngIf="isLoadingNPK2; else npk2Data">
|
||||||
|
|
|
||||||
|
|
@ -347,6 +347,14 @@ export class GraphComponent implements OnInit, AfterViewInit, OnDestroy, OnChang
|
||||||
return ['soilphosphorus', 'soilnitrogen', 'soilpotassium'].includes(parameter);
|
return ['soilphosphorus', 'soilnitrogen', 'soilpotassium'].includes(parameter);
|
||||||
} else if (selectedOption === 'others') {
|
} else if (selectedOption === 'others') {
|
||||||
return !['soilphosphorus', 'soilnitrogen', 'soilpotassium'].includes(parameter);
|
return !['soilphosphorus', 'soilnitrogen', 'soilpotassium'].includes(parameter);
|
||||||
|
} else if (selectedOption === 'temperature') {
|
||||||
|
return ['soiltemperature'].includes(parameter);
|
||||||
|
} else if (selectedOption === 'humidity') {
|
||||||
|
return ['soilhumidity'].includes(parameter);
|
||||||
|
} else if (selectedOption === 'conductivity') {
|
||||||
|
return ['soilconductivity'].includes(parameter);
|
||||||
|
} else if (selectedOption === 'ph') {
|
||||||
|
return ['soilph'].includes(parameter);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user