heating colors 3
This commit is contained in:
parent
4c54c3da96
commit
92427cb2ce
@ -3,13 +3,9 @@ import {ValuesTileComponent} from "../../../shared/values-tile/values-tile.compo
|
||||
import {Display, DisplayOrSeparator, IValue} from "../../../api/series/IValue";
|
||||
import {SeriesService} from "../../../api/series/series.service";
|
||||
|
||||
const EXHAUST_WARM = 40;
|
||||
const WARM = 25;
|
||||
|
||||
const EXHAUST_HOT = 90;
|
||||
|
||||
const WATER_WARM = 22;
|
||||
|
||||
const WATER_HOT = 60;
|
||||
const HOT = 55;
|
||||
|
||||
@Component({
|
||||
selector: 'app-dashboard-heating-tile',
|
||||
@ -33,18 +29,18 @@ export class DashboardHeatingTileComponent {
|
||||
|
||||
getDisplayList(): DisplayOrSeparator[] {
|
||||
return [
|
||||
new Display('Abgas', this.color(EXHAUST_WARM, EXHAUST_HOT, this.seriesService.heatingExhaustTemperature, ''), this.seriesService.heatingExhaustTemperature),
|
||||
new Display('Abgas', this.color(WARM, HOT, this.seriesService.heatingExhaustTemperature, ''), this.seriesService.heatingExhaustTemperature),
|
||||
null,
|
||||
new Display('Heizkreis Vorlauf', this.color(WATER_WARM, WATER_HOT, this.seriesService.heatingLoopSupplyTemperature), this.seriesService.heatingLoopSupplyTemperature),
|
||||
new Display('Heizkreis Rücklauf', this.color(WATER_WARM, WATER_HOT, this.seriesService.heatingLoopReturnTemperature), this.seriesService.heatingLoopReturnTemperature),
|
||||
new Display('Heizkreis Vorlauf', this.color(WARM, HOT, this.seriesService.heatingLoopSupplyTemperature), this.seriesService.heatingLoopSupplyTemperature),
|
||||
new Display('Heizkreis Rücklauf', this.color(WARM, HOT, this.seriesService.heatingLoopReturnTemperature), this.seriesService.heatingLoopReturnTemperature),
|
||||
null,
|
||||
new Display('Puffer Vorlauf', this.color(WATER_WARM, WATER_HOT, this.seriesService.heatingBufferSupplyTemperature), this.seriesService.heatingBufferSupplyTemperature),
|
||||
new Display('Puffer Rücklauf', this.color(WATER_WARM, WATER_HOT, this.seriesService.heatingBufferReturnTemperature), this.seriesService.heatingBufferReturnTemperature),
|
||||
new Display('Puffer Vorlauf', this.color(WARM, HOT, this.seriesService.heatingBufferSupplyTemperature), this.seriesService.heatingBufferSupplyTemperature),
|
||||
new Display('Puffer Rücklauf', this.color(WARM, HOT, this.seriesService.heatingBufferReturnTemperature), this.seriesService.heatingBufferReturnTemperature),
|
||||
null,
|
||||
new Display('Puffer Kalt', this.color(WATER_WARM, WATER_HOT, this.seriesService.heatingBufferColdTemperature), this.seriesService.heatingBufferColdTemperature),
|
||||
new Display('Puffer Speicher', this.color(WATER_WARM, WATER_HOT, this.seriesService.heatingBufferInnerTemperature), this.seriesService.heatingBufferInnerTemperature),
|
||||
new Display('Puffer Warm', this.color(WATER_WARM, WATER_HOT, this.seriesService.heatingBufferHotTemperature), this.seriesService.heatingBufferHotTemperature),
|
||||
new Display('Puffer Zirkulation', this.color(WATER_WARM, WATER_HOT, this.seriesService.heatingBufferCirculationTemperature), this.seriesService.heatingBufferCirculationTemperature),
|
||||
new Display('Puffer Kalt', this.color(WARM, HOT, this.seriesService.heatingBufferColdTemperature), this.seriesService.heatingBufferColdTemperature),
|
||||
new Display('Puffer Speicher', this.color(WARM, HOT, this.seriesService.heatingBufferInnerTemperature), this.seriesService.heatingBufferInnerTemperature),
|
||||
new Display('Puffer Warm', this.color(WARM, HOT, this.seriesService.heatingBufferHotTemperature), this.seriesService.heatingBufferHotTemperature),
|
||||
new Display('Puffer Zirkulation', this.color(WARM, HOT, this.seriesService.heatingBufferCirculationTemperature), this.seriesService.heatingBufferCirculationTemperature),
|
||||
];
|
||||
}
|
||||
|
||||
@ -52,9 +48,9 @@ export class DashboardHeatingTileComponent {
|
||||
if (value === null || value.value === null) {
|
||||
return "";
|
||||
}
|
||||
if (value.value < middle) {
|
||||
if (Math.round(value.value) < middle) {
|
||||
return smallColor;
|
||||
} else if (value.value < high) {
|
||||
} else if (Math.round(value.value) < high) {
|
||||
return middleColor;
|
||||
}
|
||||
return highColor;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user