From 1804023da9ad604cb57af7e934352ef84e127736 Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Thu, 15 Sep 2005 02:55:19 +0000 Subject: Make 4801 temp monitor work (and make it work with sajax) --- usr/local/www/javascript/index/sajax.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'usr/local/www/javascript') 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); -- cgit v1.1