List Info

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




pari: branch asterisknow r1917 - /branches/asterisknow/config/digital.htm l
user name
2007-12-05 19:52:54
Author: pari
Date: Wed Dec  5 19:52:53 2007
New Revision: 1917

URL: http://svn.digium.com/view/asterisk-gui?view=rev&am
p;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/branc
hes/asterisknow/config/digital.html?view=diff&rev=1917&a
mp;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) {


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.c
om--

asterisk-gui-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-g
ui-commits

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )