mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Adjust temperture display to use new FTL sensors.cpu_temp value
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -214,9 +214,9 @@ function updateSystemInfo() {
|
||||
var color;
|
||||
color = percentRAM > 75 ? "text-red" : "text-green-light";
|
||||
$("#memory").html(
|
||||
'<i class="fa fa-circle ' +
|
||||
'<i class="fa fa-fw fa-circle ' +
|
||||
color +
|
||||
'"></i> Memory usage: ' +
|
||||
'"></i> Memory usage: ' +
|
||||
percentRAM.toFixed(1) +
|
||||
" %"
|
||||
);
|
||||
@@ -237,9 +237,9 @@ function updateSystemInfo() {
|
||||
|
||||
color = system.cpu.load.percent[0] > 100 ? "text-red" : "text-green-light";
|
||||
$("#cpu").html(
|
||||
'<i class="fa fa-circle ' +
|
||||
'<i class="fa fa-fw fa-circle ' +
|
||||
color +
|
||||
'"></i> CPU: ' +
|
||||
'"></i> CPU: ' +
|
||||
system.cpu.load.percent[0].toFixed(1) +
|
||||
" %"
|
||||
);
|
||||
@@ -301,11 +301,11 @@ function updateSensorsInfo() {
|
||||
url: "/api/info/sensors",
|
||||
})
|
||||
.done(function (data) {
|
||||
if (data.sensors.length > 0) {
|
||||
var temp = data.sensors[0].value.toFixed(1) + " °C";
|
||||
var color = data.sensors[0].value > 50 ? "text-red" : "text-vivid-blue";
|
||||
$("#temperature").html('<i class="fa fa-fire ' + color + '"></i> Temp: ' + temp);
|
||||
} else $("#temperature").html('<i class="fa fa-fire"></i> Temp: N/A');
|
||||
if (data.sensors.cpu_temp !== null) {
|
||||
var temp = data.sensors.cpu_temp.toFixed(1) + " °C";
|
||||
var color = data.sensors.cpu_temp > data.sensors.hot_limit ? "text-red fa-temperature-high" : "text-green-light fa-temperature-low";
|
||||
$("#temperature").html('<i class="fa fa-fw fas ' + color + '"></i> Temp: ' + temp);
|
||||
} else $("#temperature").html('<i class="fa fa-fw fas fa-temperature-low"></i> Temp: N/A');
|
||||
// Update every 20 seconds
|
||||
clearTimeout(sensorsTimer);
|
||||
sensorsTimer = setTimeout(updateSensorsInfo, 20000);
|
||||
|
||||
+1
-1
@@ -577,7 +577,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array('sysadmin', 'dns', 'dhcp
|
||||
autocorrect="off" id="dhcp.leaseTime" value="">
|
||||
</div>
|
||||
</div>
|
||||
<p>The lease time can be in seconds, or minutes (e.g., "45m") or hours (e.g., "1h") or days (like "2d") or even weeks ("1w"). You may also use "infinite" as string but be aware of the drawbacks.</p>
|
||||
<p>The lease time can be in seconds, or minutes (e.g., "45m") or hours (e.g., "1h") or days (like "2d") or even weeks ("1w"). You may also use "infinite" as string but be aware of the drawbacks (assigned addresses are will only be made available again after the lease time has passed).</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
Reference in New Issue
Block a user