pari: branch 2.0 r4327 - /branches/2.0/config/js/

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Wed Dec 10 11:26:54 CST 2008


Author: pari
Date: Wed Dec 10 11:26:54 2008
New Revision: 4327

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

Trying some changes in systemCmdWithOutput(), 
to see if this is the cause for the errors reported by tiny on #asterisk-gui



Modified:
    branches/2.0/config/js/astman.js
    branches/2.0/config/js/index.js
    branches/2.0/config/js/sysinfo.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=4327&r1=4326&r2=4327
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Wed Dec 10 11:26:54 2008
@@ -2317,8 +2317,9 @@
 
 		var after = function(){
 			parent.document.getElementById('ajaxstatus').style.display = 'none';
-			ASTGUI.loadHTML( tmp_opf , cb );
-			ASTGUI.systemCmd( 'rm ' + top.sessionData.directories.guiInstall + tmp_opf, function(){});
+			ASTGUI.loadHTML( tmp_opf , function(cmd_output){
+				ASTGUI.systemCmd( 'rm ' + top.sessionData.directories.guiInstall + tmp_opf, function(){cb(cmd_output);} );
+			});
 		};
 
 		var delay_cb = function(){ setTimeout(after,500); };

Modified: branches/2.0/config/js/index.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/index.js?view=diff&rev=4327&r1=4326&r2=4327
==============================================================================
--- branches/2.0/config/js/index.js (original)
+++ branches/2.0/config/js/index.js Wed Dec 10 11:26:54 2008
@@ -645,9 +645,7 @@
 	
 		doLogout: function(){
 			var f = makeSyncRequest({ action :'logoff'});
-			DOM_mainscreen.src = 'blank.html';
-			parent.ASTGUI.dialog.waitWhile('Logging out ...');
-			setTimeout( window.location.reload , 20);
+			top.window.location.replace(top.window.location.href);
 		}
 	},
 

Modified: branches/2.0/config/js/sysinfo.js
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/js/sysinfo.js?view=diff&rev=4327&r1=4326&r2=4327
==============================================================================
--- branches/2.0/config/js/sysinfo.js (original)
+++ branches/2.0/config/js/sysinfo.js Wed Dec 10 11:26:54 2008
@@ -48,16 +48,23 @@
 };
 
 function getsysinfohtml(){
-	ASTGUI.systemCmdWithOutput( 'uname -a' , function(output){ _$('osversion').innerHTML = output; });
-	ASTGUI.systemCmdWithOutput( 'uptime' , function(output){ _$('uptime').innerHTML = output.replace(/load average/, "<BR>Load Average"); });
-	ASTGUI.systemCmdWithOutput( 'date' , function(output){ 
-		_$('today').innerHTML = (parent.sessionData.PLATFORM.isAA50) ? ASTGUI.toLocalTime(output).camelize() : output ;
-		if(parent.sessionData.PLATFORM.isAA50) {
-			_$('today').innerHTML += "&nbsp;&nbsp;<A href='date.html' class='splbutton' title='Click to update Date and Time'><B>Edit</B></A>";
-		}
-	});
-	ASTGUI.systemCmdWithOutput( 'hostname' , function(output){ 
-		_$('hostname').innerHTML = output ;
+	ASTGUI.systemCmdWithOutput( 'uname -a' , function(uname){
+		_$('osversion').innerHTML = uname;
+
+		ASTGUI.systemCmdWithOutput( 'uptime' , function(uptime){
+			_$('uptime').innerHTML = uptime.replace(/load average/, "<BR>Load Average");
+
+			ASTGUI.systemCmdWithOutput( 'date' , function(DATE_OUTPUT){
+				_$('today').innerHTML = (parent.sessionData.PLATFORM.isAA50) ? ASTGUI.toLocalTime(DATE_OUTPUT).camelize() : DATE_OUTPUT ;
+				if(parent.sessionData.PLATFORM.isAA50) {
+					_$('today').innerHTML += "&nbsp;&nbsp;<A href='date.html' class='splbutton' title='Click to update Date and Time'><B>Edit</B></A>";
+				}
+
+				ASTGUI.systemCmdWithOutput( 'hostname' , function(HOSTNAME){
+					_$('hostname').innerHTML = HOSTNAME ;
+				});
+			});
+		});
 	});
 
 	_$('asterisk').innerHTML =  parent.sessionData.AsteriskVersionString + "<BR>" + "Asterisk GUI-version : " + ( parent.sessionData.gui_version || ASTGUI.globals.version ) ;




More information about the asterisk-gui-commits mailing list