summaryrefslogtreecommitdiffstats
path: root/usr/local/www/javascript
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-09-15 02:55:19 +0000
committerBill Marquette <billm@pfsense.org>2005-09-15 02:55:19 +0000
commit1804023da9ad604cb57af7e934352ef84e127736 (patch)
tree9e0289ec45e291b749467dab96dbe59b1cbf2b1a /usr/local/www/javascript
parent9f0309d3ab54a3c781fdbce3358e12f07eb7b893 (diff)
downloadpfsense-1804023da9ad604cb57af7e934352ef84e127736.zip
pfsense-1804023da9ad604cb57af7e934352ef84e127736.tar.gz
Make 4801 temp monitor work (and make it work with sajax)
Diffstat (limited to 'usr/local/www/javascript')
-rw-r--r--usr/local/www/javascript/index/sajax.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/usr/local/www/javascript/index/sajax.js b/usr/local/www/javascript/index/sajax.js
index 110812d..036b38d 100644
--- a/usr/local/www/javascript/index/sajax.js
+++ b/usr/local/www/javascript/index/sajax.js
@@ -4,6 +4,7 @@ function updateMeters()
x_mem_usage(updateMemory);
x_get_uptime(updateUptime);
x_get_pfstate(updateState);
+ x_get_temp(updateTemp);
window.setTimeout('updateMeters()', 5000);
}
@@ -24,6 +25,16 @@ function updateCPU(x)
document.getElementById("cpuwidthb").style.width = (100 - x) + 'px';
}
+function updateTemp(x)
+{
+ if(document.getElementById("tempmeter")) {
+ document.getElementById("tempmeter").value = x + '%';
+
+ document.getElementById("tempwidtha").style.width = x + 'px';
+ document.getElementById("tempwidthb").style.width = (100 - x) + 'px';
+ }
+}
+
function updateUptime(x)
{
document.getElementById("uptime").value = x;
@@ -34,4 +45,4 @@ function updateState(x)
document.getElementById("pfstate").value = x;
}
-window.setTimeout('updateMeters()', 5000); \ No newline at end of file
+window.setTimeout('updateMeters()', 5000);
OpenPOWER on IntegriCloud