rbrindley: branch rbrindley/welcome_revamp r4238 - /team/rbrindley/welcome_re...

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Mon Dec 1 09:18:15 CST 2008


Author: rbrindley
Date: Mon Dec  1 09:18:15 2008
New Revision: 4238

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4238
Log:
copied and then modified loadConferences from welcome.js

Modified:
    team/rbrindley/welcome_revamp/config/js/welcome2.js

Modified: team/rbrindley/welcome_revamp/config/js/welcome2.js
URL: http://svn.digium.com/view/asterisk-gui/team/rbrindley/welcome_revamp/config/js/welcome2.js?view=diff&rev=4238&r1=4237&r2=4238
==============================================================================
--- team/rbrindley/welcome_revamp/config/js/welcome2.js (original)
+++ team/rbrindley/welcome_revamp/config/js/welcome2.js Mon Dec  1 09:18:15 2008
@@ -336,7 +336,64 @@
 };
 
 var loadConferenceRooms = function() {
-
+	var conf_template = $('#sys_status_meetme > .body > div.template');
+	var conf_body = $('#sys_status_meetme > .body');
+	var active_conferences = {};
+
+	var meetme_status = ASTGUI.cliCommand('meetme');
+	meetme_status = parent.ASTGUI.parseCLIResponse(meetme_status);
+	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];
+			meetme_status.removeFirst();
+			this_line = this_line.trim();
+			if( !this_line || 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] ] = {} ;
+			active_conferences[ tmp_vars[0] ]['count'] = tmp_vars[1] ;
+			active_conferences[ tmp_vars[0] ]['duration'] = tmp_vars[3] ;
+		}
+	}
+
+	var active_count = 0;
+	var m = parent.sessionData.pbxinfo.conferences;
+	for( l in m ) { 
+		if( !m.hasOwnProperty(l) || l =='admin') {
+			continue;
+		}
+
+		var tmp = conf_template.clone();
+
+		tmp.contents().find(".name").html(l);
+		if( active_conferences.hasOwnProperty(l) ) {
+			active_count++;
+			tmp.contents().find(".status").html(Number(active_conferences[l].count) + ' Users');
+			tmp.contents().find(".time").html(active_conferences[l].duration);
+			//newcell.innerHTML =  l + '<BR><font color=red>' + Number(active_conferences[l].count) + ' Users</font> - ' + active_conferences[l].duration ;
+		}else{
+			tmp.contents().find(".status").html('Not In Use');
+			tmp.contents().find(".time").html("00:00");
+		}
+		tmp.contents().find(".members > .list > tbody").empty().html('<tr><td colspan="4">Not yet implemented</td></tr>');
+
+		tmp.appendTo(conf_body);
+		tmp.removeClass("template");
+	}
+
+	if(active_count){
+		if(manager_timers.conferences){ clearTimeout ( manager_timers.conferences ) } ;
+		manager_timers.conferences = setTimeout ( update_Conferences_Table , 5000 ) ;
+	}
 };
 
 var loadParkingLot = function() {




More information about the asterisk-gui-commits mailing list