mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Hide CPU temp if it is not available
This commit is contained in:
+11
-16
@@ -236,17 +236,16 @@
|
||||
}
|
||||
|
||||
// CPU Temp
|
||||
echo "<a href=\"#\" id=\"temperature\"><i class=\"fa fa-fire\" style=\"color:";
|
||||
if ($celsius > 45 || $celsius < -273.15) {
|
||||
echo "#FF0000";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "#3366FF";
|
||||
}
|
||||
echo "\"></i> Temp: ";
|
||||
if($celsius >= -273.15)
|
||||
{
|
||||
if ($celsius >= -273.15) {
|
||||
echo "<a href=\"#\" id=\"temperature\"><i class=\"fa fa-fire\" style=\"color:";
|
||||
if ($celsius > 45) {
|
||||
echo "#FF0000";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "#3366FF";
|
||||
}
|
||||
echo "\"></i> Temp: ";
|
||||
if($temperatureunit != "F")
|
||||
{
|
||||
echo round($celsius,1) . "°C";
|
||||
@@ -255,12 +254,8 @@
|
||||
{
|
||||
echo round($fahrenheit,1) . "°F";
|
||||
}
|
||||
echo "</a>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "N/A";
|
||||
}
|
||||
echo "</a>";
|
||||
?>
|
||||
<br/>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user