pari: branch aadk r445 - in /branches/aadk/config: gui_sysinfo sysinfo.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Fri Mar 16 09:04:29 MST 2007


Author: pari
Date: Fri Mar 16 11:04:28 2007
New Revision: 445

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=445
Log:
Display temperatures in system information 

Modified:
    branches/aadk/config/gui_sysinfo
    branches/aadk/config/sysinfo.html

Modified: branches/aadk/config/gui_sysinfo
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/gui_sysinfo?view=diff&rev=445&r1=444&r2=445
==============================================================================
--- branches/aadk/config/gui_sysinfo (original)
+++ branches/aadk/config/gui_sysinfo Fri Mar 16 11:04:28 2007
@@ -40,3 +40,10 @@
 /bin/echo "</div>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo.html
 
 
+/bin/echo "<div id=temp1_status>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo.html
+/bin/cat /sys/bus/i2c/devices/0-0049/temp1_input >> /var/lib/asterisk/static-http/config/bkps/sysinfo.html
+/bin/echo "</div>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo.html
+
+/bin/echo "<div id=temp2_status>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo.html
+/bin/cat /sys/bus/i2c/devices/0-004a/temp1_input >> /var/lib/asterisk/static-http/config/bkps/sysinfo.html
+/bin/echo "</div>" >> /var/lib/asterisk/static-http/config/bkps/sysinfo.html

Modified: branches/aadk/config/sysinfo.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/sysinfo.html?view=diff&rev=445&r1=444&r2=445
==============================================================================
--- branches/aadk/config/sysinfo.html (original)
+++ branches/aadk/config/sysinfo.html Fri Mar 16 11:04:28 2007
@@ -28,7 +28,7 @@
 <script>
 var sysinfocallbacks = new Object;
 var tabs = new Array('tab1', 'tab2', 'tab3');
-var divs_tohide = new Array('osversion_div', 'uptime_div', 'asterisk_div', 'today_div','hostname_div','ifconfig_div','df_div','memory_div');
+var divs_tohide = new Array('osversion_div', 'uptime_div', 'asterisk_div', 'today_div','hostname_div','ifconfig_div','df_div','memory_div','temp_div');
 
 function show_window(x){
 		for(i=0; i < tabs.length ; i++){
@@ -46,7 +46,9 @@
 			var divs_toshow = new Array('ifconfig_div');
 			break;
 			case 3:
-			var divs_toshow = new Array('df_div','memory_div');
+			if( $('temperature1').innerHTML ){ 
+			var divs_toshow = new Array('df_div','memory_div','temp_div');
+			}else{	var divs_toshow = ['df_div','memory_div']; }
 			break;
 		}
 		
@@ -82,6 +84,13 @@
 				$('ifconfig').innerHTML =$('si_ifconfig').innerHTML;
 				$('diskusage').innerHTML = $('si_du').innerHTML;
 				$('memoryusage').innerHTML =$('si_free').innerHTML;
+				if(parseInt($('temp1_status').innerHTML,10)){
+					$('temperature1').innerHTML = parseInt($('temp1_status').innerHTML,10)/1000 + " °C";
+					$('temperature2').innerHTML = parseInt($('temp2_status').innerHTML,10)/1000 + " °C";
+				}else{
+					$('temperature1').innerHTML = "";
+					$('temperature2').innerHTML = "";
+				}
 
 				var divs_toshow = new Array('osversion_div', 'uptime_div', 'asterisk_div', 'today_div','hostname_div');
 				for(var i=0; i < divs_toshow.length; i++ ){
@@ -148,6 +157,9 @@
 						<div id="ifconfig_div" style="display:none; height:430px; ">
 								ifconfig:<PRE><div id="ifconfig" style="font-family:courier; font-size:8.5pt; height:410px; overflow :auto;"></div></PRE>
 						</div>
+						<div id="temp_div" style="display:none;">
+								Temperature: <span id="temperature1"></span> , <span id="temperature2"></span><BR><BR>
+						</div>
 						<div id="df_div" style="display:none;">
 								Disk Usage:<PRE><div id="diskusage" style="font-family:courier; font-size:10pt;"></div></PRE>
 						</div>



More information about the asterisk-gui-commits mailing list