pari: branch 2.0 r4097 - /branches/2.0/config/welcome.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Nov 11 19:43:05 CST 2008


Author: pari
Date: Tue Nov 11 19:43:05 2008
New Revision: 4097

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4097
Log:

 Refresh active conferences list every 5 seconds



Modified:
    branches/2.0/config/welcome.html

Modified: branches/2.0/config/welcome.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/welcome.html?view=diff&rev=4097&r1=4096&r2=4097
==============================================================================
--- branches/2.0/config/welcome.html (original)
+++ branches/2.0/config/welcome.html Tue Nov 11 19:43:05 2008
@@ -159,7 +159,10 @@
 			if( op_LC.contains('event: queuememberstatus') ){
 				setTimeout( update_AgentsListing_Table , 1000 );
 			}else if( op_LC.contains('event: meetmeleave') ||  op_LC.contains('event: meetmejoin') ){
-				setTimeout( update_Conferences_Table , 1000 );
+
+				if(manager_timers.conferences){ clearTimeout ( manager_timers.conferences ) } ;
+				manager_timers.conferences = setTimeout ( update_Conferences_Table , 2000 ) ;
+
 			}else if( op_LC.contains('event: link') ||  op_LC.contains('event: unlink') ){
 
 				if(manager_timers.parkedCalls){ clearTimeout ( manager_timers.parkedCalls ) } ;
@@ -569,6 +572,7 @@
 		}
 	})();
 
+	var active_count = 0;
 	var td_COUNT = 0, m = parent.sessionData.pbxinfo.conferences ;
 	for( l in m ){ if( m.hasOwnProperty(l) && l !='admin'){
 
@@ -583,6 +587,7 @@
 		newcell.align = 'center' ;
 
 		if( active_conferences.hasOwnProperty(l) ){
+			active_count++;
 			newcell.innerHTML =  l + '<BR><font color=red>' + Number(active_conferences[l].count) + ' Users</font> - ' + active_conferences[l].duration ;
 		}else{
 			newcell.innerHTML =  l + '<BR><font color=green>Not in use</font>' ;
@@ -595,6 +600,12 @@
 		newcell.align =  'center' ;
 		newcell.innerHTML =  'No Conferences setup' ;
 	}
+
+	if(active_count){
+		if(manager_timers.conferences){ clearTimeout ( manager_timers.conferences ) } ;
+		manager_timers.conferences = setTimeout ( update_Conferences_Table , 5000 ) ;
+	}
+
 };
 
 




More information about the asterisk-gui-commits mailing list