Skip to content

Commit e22d67f

Browse files
committed
Check whether temperature values are available
1 parent d7dbdc4 commit e22d67f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

main/http_server/axe-os/src/app/components/home/home.component.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<ng-template #loading>
22
<h4>Loading...</h4>
33
</ng-template>
4+
<ng-template #noTemp>--</ng-template>
45
<ng-container *ngIf="info$ | async as info; else loading">
56
<!-- Temp warning alert -->
67
<p-message *ngIf="info.overheat_mode" severity="error" styleClass="w-full mb-4 py-4 border-round-xl"
@@ -203,7 +204,6 @@ <h4 class="text-center">Heat</h4>
203204
<h6 class="flex justify-content-between mb-1">
204205
ASIC Temperature
205206
<span>
206-
<ng-template #noTemp>--</ng-template>
207207
<ng-container *ngIf="info.temp > 0; else noTemp">
208208
{{info.temp}} &deg;C
209209
</ng-container>
@@ -290,11 +290,15 @@ <h5>Uptime Information</h5>
290290
</tr>
291291
<tr>
292292
<td>Maximum ASIC Temperature:</td>
293-
<td>{{info.tempMax}}&deg;C</td>
293+
<ng-container *ngIf="info.tempMax > 0; else noTemp">
294+
<td>{{info.tempMax}}&deg;C</td>
295+
</ng-container>
294296
</tr>
295297
<tr>
296-
<td>Maximum VR Temperature:</td>
297-
<td>{{info.vrTempMax}}&deg;C</td>
298+
<ng-container *ngIf="info.vrTempMax > 0">
299+
<td>Maximum VR Temperature:</td>
300+
<td>{{info.vrTempMax}}&deg;C</td>
301+
</ng-container>
298302
</tr>
299303
</table>
300304
</div>

0 commit comments

Comments
 (0)