pari: branch asterisknow r1897 - /branches/asterisknow/config/users.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Dec 4 16:57:11 CST 2007


Author: pari
Date: Tue Dec  4 16:57:10 2007
New Revision: 1897

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1897
Log:
update how we load list of FXO sinalled analog ports in users.html according to new ztscan

Modified:
    branches/asterisknow/config/users.html

Modified: branches/asterisknow/config/users.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/users.html?view=diff&rev=1897&r1=1896&r2=1897
==============================================================================
--- branches/asterisknow/config/users.html (original)
+++ branches/asterisknow/config/users.html Tue Dec  4 16:57:10 2007
@@ -270,15 +270,20 @@
 	
 }
 
-function analoglines_loaded(b){
-	var c = b ;
+function analoglines_loaded(c){
 	var _zapchan = _$('zapchan') ;
-
-	for( var d in c ){
-		if ( c.hasOwnProperty(d) && c[d]['port'] && (c[d]['port'] == 'fxo' ) ) {
-			ASTGUI.selectbox.append(_zapchan,"Analog Port #" + d, d);
-		}
-	}
+	var y;
+
+	for( var d in c ){ if (c.hasOwnProperty(d) ) {
+		c[d].each( 
+			function( item ) {
+				if( item.beginsWith('port') && item.contains('FXO') ){ // we are looking for item if it is in the format 'port=4,FXO'
+					y = item.split('=')[1].split(',')[0];
+					ASTGUI.selectbox.append( _zapchan,"Analog Port #" + y , y );
+				}
+			}
+		);
+	}}
 
 	ASTGUI.selectbox.insert_before(_zapchan,"None", "", 0);
 	config2json('extensions.conf', 1, dialplans_loaded ) ;
@@ -346,7 +351,11 @@
 				}
 			}
 		}
-		config2json('zapscan.conf', 1, analoglines_loaded ) ;
+
+		parent.astmanEngine.run_tool(asterisk_guiZtscan, function(t) { // run ztscan and then try loading ztscan.conf
+			setTimeout( function(){ config2json('ztscan.conf', 0, analoglines_loaded ) ; } , 500); // leave some time for ztscan to generate ztscan.conf
+		});
+		
 		return true;
 	});
 }




More information about the asterisk-gui-commits mailing list