diff options
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); |