mirror of
https://github.com/pi-hole/web.git
synced 2026-02-26 20:53:18 +00:00
Merge branch 'devel' into auth
Conflicts: header.php
This commit is contained in:
23
header.php
23
header.php
@@ -37,8 +37,14 @@
|
||||
|
||||
$cmd = "echo $((`cat /sys/class/thermal/thermal_zone0/temp | cut -c1-2`))";
|
||||
$output = shell_exec($cmd);
|
||||
<<<<<<< HEAD
|
||||
$output = str_replace(array("\r\n","\r","\n"),"", $output);
|
||||
|
||||
=======
|
||||
$celsius = str_replace(array("\r\n","\r","\n"),"", $output);
|
||||
$fahrenheit = round(str_replace(["\r\n","\r","\n"],"", $output*9./5)+32);
|
||||
$temperatureunit = parse_ini_file("/etc/pihole/setupVars.conf")['TEMPERATUREUNIT'];
|
||||
>>>>>>> devel
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
@@ -176,11 +182,20 @@
|
||||
}
|
||||
|
||||
// CPU Temp
|
||||
if ($output > "45") {
|
||||
echo '<a href="#"><i class="fa fa-fire" style="color:#FF0000"></i> Temp: ' . $output . '</a>';
|
||||
} else {
|
||||
echo '<a href="#"><i class="fa fa-fire" style="color:#3366FF"></i> Temp: ' . $output . '</a>';
|
||||
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 $celsius . '°C';
|
||||
else
|
||||
echo $fahrenheit . '°F';
|
||||
echo '</a>';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user