Cistern Graph image url FIX
This commit is contained in:
parent
6aac9b2662
commit
b6dfdd5686
@ -15,4 +15,4 @@
|
|||||||
<td class="unit">{{ seriesService.cisternVolume.series?.lastValue?.unit?.unit }}</td>
|
<td class="unit">{{ seriesService.cisternVolume.series?.lastValue?.unit?.unit }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<img width="100%" src="http://localhost:8081/Series/Graph/{{seriesService.cisternVolume.series?.id}}/400/100/FIVE/0/288" alt="Graf">
|
<img width="100%" *ngIf="seriesService.cisternVolume.series" [src]="graph(seriesService.cisternVolume.series)" [alt]="seriesService.cisternVolume.series.title">
|
||||||
|
|||||||
@ -1,10 +1,15 @@
|
|||||||
import {Component, OnDestroy, OnInit} from '@angular/core';
|
import {Component, OnDestroy, OnInit} from '@angular/core';
|
||||||
import {SeriesService} from '../series/series.service';
|
import {SeriesService} from '../series/series.service';
|
||||||
import {Subscription} from 'rxjs';
|
import {Subscription} from 'rxjs';
|
||||||
|
import {NgIf} from '@angular/common';
|
||||||
|
import {Series} from '../series/Series';
|
||||||
|
import {ApiService} from '../core/api.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-cistern',
|
selector: 'app-cistern',
|
||||||
imports: [],
|
imports: [
|
||||||
|
NgIf
|
||||||
|
],
|
||||||
templateUrl: './cistern.component.html',
|
templateUrl: './cistern.component.html',
|
||||||
styleUrl: './cistern.component.less'
|
styleUrl: './cistern.component.less'
|
||||||
})
|
})
|
||||||
@ -25,4 +30,8 @@ export class CisternComponent implements OnInit, OnDestroy {
|
|||||||
this.subs.forEach(sub => sub.unsubscribe());
|
this.subs.forEach(sub => sub.unsubscribe());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
graph(series: Series) {
|
||||||
|
return ApiService.url('http', ['Series', 'Graph', series.id, '400', '100', 'FIVE', '0', '288']);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user