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

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Mon Sep 22 16:08:34 CDT 2008


Author: pari
Date: Mon Sep 22 16:08:34 2008
New Revision: 3853

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

 Basic implementation of 'Showing the status of each conference room' in Welcome page - Not realtime



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=3853&r1=3852&r2=3853
==============================================================================
--- branches/2.0/config/welcome.html (original)
+++ branches/2.0/config/welcome.html Mon Sep 22 16:08:34 2008
@@ -353,15 +353,45 @@
 
 	(function(){ // List all meetMe Extensions
 		var m = parent.sessionData.pbxinfo.conferences ;
+		var meetme_status = ASTGUI.cliCommand('meetme');
+		meetme_status = parent.ASTGUI.parseCLIResponse(meetme_status);
+		var active_conferences = {};
+
+		if ( meetme_status.contains('No active MeetMe conferences') ){
+			// No active MeetMe conferences.
+		}else{
+			// sx00i*CLI> meetme
+			// Conf Num       Parties        Marked     Activity  Creation
+			// 6302           0001           N/A        00:00:09  Static
+			// 6300           0001           N/A        00:02:51  Static
+			// * Total number of MeetMe users: 2
+			meetme_status = meetme_status.split('\n');
+
+			while( meetme_status.length ){
+				var this_line = meetme_status[0];
+				if( this_line.beginsWith('Conf Num') ||  this_line.beginsWith('* Total number') ) continue;
+				var tmp_vars = this_line.split(/\s+/); // ['6302','0001','N/A','00:00:09', 'Static' ]
+				active_conferences[ tmp_vars[0] ] = String( Number(tmp_vars[1]) ) ;
+				meetme_status.removeFirst();
+			}
+		}
+
 		for( l in m ){ if( m.hasOwnProperty(l) && l !='admin'){
 				var newRow = DOM_table_Ext_list.insertRow(-1);
 				newRow.className = ((DOM_table_Ext_list.rows.length)%2==1)?'odd':'even';
 				addCell( newRow , { html:'' });
 				addCell( newRow , { html: l });
-				addCell( newRow , { html: '' });
-				addCell( newRow , { html: '' } );
-				addCell( newRow , { html: 'Conference Room' });
+				addCell( newRow , { html: '<b>Conference Room</b>' });
+
+				if( active_conferences.hasOwnProperty(l) ){
+					addCell( newRow , { html: '<font color=red>' + active_conferences.l + ' Users</font>' });
+				}else{
+					addCell( newRow , { html: '<font color=green>Not in use</font>' });
+				}
+				addCell( newRow , { html: 'MeetMe' });
 		}}
+
+
 	})();
 
 	(function(){ // List all Queue Extensions




More information about the asterisk-gui-commits mailing list