succd: Render temperature unit in template as well
All checks were successful
/ test (push) Successful in 10s
/ test (pull_request) Successful in 11s

This commit is contained in:
Rahix 2024-11-10 02:08:05 +01:00
parent edb9051708
commit 0e45650972

View file

@ -164,24 +164,24 @@ td > span {
<tr> <tr>
<th rowspan="4">Temperatures</th> <th rowspan="4">Temperatures</th>
<th>DP Bottom</th> <th>DP Bottom</th>
<td id="temp-dp-bottom">{{ .Temperatures.DPBottom }}</td> <td id="temp-dp-bottom">{{ .Temperatures.DPBottom }}&nbsp;°C</td>
</tr> </tr>
<tr> <tr>
<th>DP Top</th> <th>DP Top</th>
<td id="temp-dp-top">{{ .Temperatures.DPTop }}</td> <td id="temp-dp-top">{{ .Temperatures.DPTop }}&nbsp;°C</td>
</tr> </tr>
<tr> <tr>
<th>DP Inlet</th> <th>DP Inlet</th>
<td id="temp-dp-inlet">{{ .Temperatures.DPInlet }}</td> <td id="temp-dp-inlet">{{ .Temperatures.DPInlet }}&nbsp;°C</td>
</tr> </tr>
<tr> <tr>
<th>SEM Environment</th> <th>SEM Environment</th>
<td id="temp-sem">{{ .Temperatures.SEM }}</td> <td id="temp-sem">{{ .Temperatures.SEM }}&nbsp;°C</td>
</tr> </tr>
<tr> <tr>
<th>Humidity</th> <th>Humidity</th>
<th>SEM Environment</th> <th>SEM Environment</th>
<td id="humidity-sem">{{ .Humidity.SEM }}</td> <td id="humidity-sem">{{ .Humidity.SEM }}%</td>
</tr> </tr>
</table> </table>
@ -419,7 +419,7 @@ window.addEventListener("load", (_) => {
tempSEM.innerHTML = data.Temperatures.SEM + "&nbsp;°C"; tempSEM.innerHTML = data.Temperatures.SEM + "&nbsp;°C";
tempSEM.style = (data.Temperatures.SEM > 30) ? tempSEM.style = (data.Temperatures.SEM > 30) ?
colors.highlightCaution : colors.default; colors.highlightCaution : colors.default;
humiditySEM.innerHTML = data.Humidity.SEM + "&nbsp;%"; humiditySEM.innerHTML = data.Humidity.SEM + "%";
humiditySEM.style = (data.Humidity.SEM > 59) ? humiditySEM.style = (data.Humidity.SEM > 59) ?
colors.highlightCaution : colors.default; colors.highlightCaution : colors.default;