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 {Display, DisplayOrSeparator, IValue} from "../../../api/series/IValue";
|
||||||
import {SeriesService} from "../../../api/series/series.service";
|
import {SeriesService} from "../../../api/series/series.service";
|
||||||
|
|
||||||
const EXHAUST_WARM = 40;
|
const WARM = 25;
|
||||||
|
|
||||||
const EXHAUST_HOT = 90;
|
const HOT = 55;
|
||||||
|
|
||||||
const WATER_WARM = 22;
|
|
||||||
|
|
||||||
const WATER_HOT = 60;
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dashboard-heating-tile',
|
selector: 'app-dashboard-heating-tile',
|
||||||
@ -33,18 +29,18 @@ export class DashboardHeatingTileComponent {
|
|||||||
|
|
||||||
getDisplayList(): DisplayOrSeparator[] {
|
getDisplayList(): DisplayOrSeparator[] {
|
||||||
return [
|
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,
|
null,
|
||||||
new Display('Heizkreis Vorlauf', this.color(WATER_WARM, WATER_HOT, this.seriesService.heatingLoopSupplyTemperature), this.seriesService.heatingLoopSupplyTemperature),
|
new Display('Heizkreis Vorlauf', this.color(WARM, 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 Rücklauf', this.color(WARM, HOT, this.seriesService.heatingLoopReturnTemperature), this.seriesService.heatingLoopReturnTemperature),
|
||||||
null,
|
null,
|
||||||
new Display('Puffer Vorlauf', this.color(WATER_WARM, WATER_HOT, this.seriesService.heatingBufferSupplyTemperature), this.seriesService.heatingBufferSupplyTemperature),
|
new Display('Puffer Vorlauf', this.color(WARM, 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 Rücklauf', this.color(WARM, HOT, this.seriesService.heatingBufferReturnTemperature), this.seriesService.heatingBufferReturnTemperature),
|
||||||
null,
|
null,
|
||||||
new Display('Puffer Kalt', this.color(WATER_WARM, WATER_HOT, this.seriesService.heatingBufferColdTemperature), this.seriesService.heatingBufferColdTemperature),
|
new Display('Puffer Kalt', this.color(WARM, 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 Speicher', this.color(WARM, 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 Warm', this.color(WARM, 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 Zirkulation', this.color(WARM, HOT, this.seriesService.heatingBufferCirculationTemperature), this.seriesService.heatingBufferCirculationTemperature),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,9 +48,9 @@ export class DashboardHeatingTileComponent {
|
|||||||
if (value === null || value.value === null) {
|
if (value === null || value.value === null) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
if (value.value < middle) {
|
if (Math.round(value.value) < middle) {
|
||||||
return smallColor;
|
return smallColor;
|
||||||
} else if (value.value < high) {
|
} else if (Math.round(value.value) < high) {
|
||||||
return middleColor;
|
return middleColor;
|
||||||
}
|
}
|
||||||
return highColor;
|
return highColor;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user