pari: branch asterisknow r1917 - /branches/asterisknow/config/digital.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Wed Dec 5 19:52:54 CST 2007


Author: pari
Date: Wed Dec  5 19:52:53 2007
New Revision: 1917

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1917
Log:
also store basechan - might help us further in detecting h/w changes  

Modified:
    branches/asterisknow/config/digital.html

Modified: branches/asterisknow/config/digital.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/digital.html?view=diff&rev=1917&r1=1916&r2=1917
==============================================================================
--- branches/asterisknow/config/digital.html (original)
+++ branches/asterisknow/config/digital.html Wed Dec  5 19:52:53 2007
@@ -363,14 +363,18 @@
 			}
 			for( var l in n ){ if(n.hasOwnProperty(l)){
 				if(n[l]['type'] == 'analog'){
-					DETECTEDHARDWARE[ n[l]['location'] ] = n[l]['devicetype'];
+					DETECTEDHARDWARE[ n[l]['location'] ] = {};
+					DETECTEDHARDWARE[ n[l]['location'] ]['device'] = n[l]['devicetype'];
+					DETECTEDHARDWARE[ n[l]['location'] ]['basechan'] = n[l]['basechan'];
 					continue;
 				} // in this page, we care only about digital spans
 				SPANS[l] = {};
 				for( var k in n[l] ){ if(n[l].hasOwnProperty(k)){ 
 					SPANS[l][k] = n[l][k]; // store all the other fields in spans[l]
-					if( k=='location' ){
-						DETECTEDHARDWARE[ n[l]['location'] ] = n[l]['devicetype'];
+					if( k=='location' && !(DETECTEDHARDWARE[n[l]['location']]) ){
+						DETECTEDHARDWARE[ n[l]['location'] ] = {};
+						DETECTEDHARDWARE[ n[l]['location'] ]['device'] = n[l]['devicetype'];
+						DETECTEDHARDWARE[ n[l]['location'] ]['basechan'] = n[l]['basechan'];
 					}
 					if( k == 'totchans' ){
 						SPANS[l]['spantype'] = n[l]['type'].split('-')[1]; // part after '-' in 'digital-T1' or 'digital-E1'
@@ -541,9 +545,11 @@
 
 		var storeNewinfo = function(){
 			var uri = ''; c=0;
+
 			for(var g in DETECTEDHARDWARE){ if( DETECTEDHARDWARE.hasOwnProperty(g) ) { // g is location
 				uri += build_action('newcat', c, g , "", ""); c++;
-				uri += build_action('update', c, g , "device", DETECTEDHARDWARE[g] ); c++;
+				uri += build_action('update', c, g , "device", DETECTEDHARDWARE[g]['device'] ); c++;
+				uri += build_action('update', c, g , "basechan", DETECTEDHARDWARE[g]['basechan'] ); c++;
 			}}
 
 			makerequest('u', hwcfgfile, uri , function(t) {




More information about the asterisk-gui-commits mailing list