pari: branch 2.0 r4163 - /branches/2.0/config/js/astman.js

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Thu Nov 20 14:35:04 CST 2008


Author: pari
Date: Thu Nov 20 14:35:03 2008
New Revision: 4163

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

Fix for AA50-2254 : Display of IAX2 trunk incorrect on AA50 GUI status page



Modified:
    branches/2.0/config/js/astman.js

Modified: branches/2.0/config/js/astman.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/astman.js?view=diff&rev=4163&r1=4162&r2=4163
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Thu Nov 20 14:35:03 2008
@@ -1232,8 +1232,10 @@
 		for(var i = 0; i < lines.length; i++) {
 			var line = lines[i].trim().toLowerCase();
 			if (!line || line.beginsWith('host') ){ continue; }
-			if( ( line.beginsWith(host+':') || ( this_IP && line.beginsWith(this_IP + ' ') ) )  && line.contains( ' ' + uname_lc + ' ' ) ){
-				if( line.contains(' registered') ){
+			if( ( line.contains(host) || (this_IP && line.contains(this_IP)) )  && line.contains(uname_lc) ){
+				if( line.contains('unregistered') ){
+					return '<font color=red>Unregistered</font>';
+				}else if( line.contains('registered') ){
 					return '<font color=green>Registered</font>' ;
 				}else if( line.contains('auth. sent') ){
 					return '<font color=red>Waiting for Authentication</font>';
@@ -1241,8 +1243,6 @@
 					return '<font color=red>Request Sent</font>';
 				}else if( line.contains('rejected') ){
 					return '<font color=red>Rejected</font>';
-				}else if( line.contains('unregistered') ){
-					return '<font color=red>Unregistered</font>';
 				}else{
 					return '<font color=red>Unregistered</font>';
 				}




More information about the asterisk-gui-commits mailing list