pari: trunk r630 - /trunk/config/scripts/astman.js

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Mon Apr 9 14:49:04 MST 2007


Author: pari
Date: Mon Apr  9 16:49:04 2007
New Revision: 630

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=630
Log:
throw detailed error message - instead of a 404, if the user does not have 'manager' or 'http/manager' enabled

Modified:
    trunk/config/scripts/astman.js

Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?view=diff&rev=630&r1=629&r2=630
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Mon Apr  9 16:49:04 2007
@@ -1609,7 +1609,12 @@
 			asynchronous: true,
 			onSuccess: this.managerResponse,
 			onFailure: function(t) {
+				if( request == 'action=ping' && String(t.status) == '404' ){
+				 gui_alert("Error: " +" Make sure <I>enabled=yes</I> and <I>webenabled=yes</I> are set in manager.conf");
+				 setLoggedOn(0);
+				}else{
 				gui_alert("Error: " + t.status + ": " + t.statusText);
+				}
 			}
 		};
 		me.callback = callback;



More information about the asterisk-gui-commits mailing list