diff options
author | Bill Marquette <billm@pfsense.org> | 2005-09-15 02:55:19 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-09-15 02:55:19 +0000 |
commit | 1804023da9ad604cb57af7e934352ef84e127736 (patch) | |
tree | 9e0289ec45e291b749467dab96dbe59b1cbf2b1a /usr/local/www/javascript | |
parent | 9f0309d3ab54a3c781fdbce3358e12f07eb7b893 (diff) | |
download | pfsense-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.js | 13 |
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); |