pari: trunk r187 - /trunk/config/setup/1.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Wed Dec 20 16:51:41 MST 2006


Author: pari
Date: Wed Dec 20 17:51:40 2006
New Revision: 187

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=187
Log:
Alert on invalid password during login through setup wizard

Modified:
    trunk/config/setup/1.html

Modified: trunk/config/setup/1.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/setup/1.html?view=diff&rev=187&r1=186&r2=187
==============================================================================
--- trunk/config/setup/1.html (original)
+++ trunk/config/setup/1.html Wed Dec 20 17:51:40 2006
@@ -62,7 +62,7 @@
 			if ( lines[i].substr(0,9) == "Category-"  ){
 				var tmp = lines[i].split(": ");
 				if( tmp[1].match(asterisk_guitools) ){
-					parent.astmanEngine.config2list("zapscan.conf", $('zapchan'), new Array(), zapcallbacks);
+					scan_zapteldevices();
 					return false;
 				}
 				cats.push(tmp[1]);
@@ -77,7 +77,7 @@
 		var opt = {
 			method: 'get',
 			asynchronous: true,
-			onComplete: show_installed
+			onComplete: scan_zapteldevices
 		};
 		opt.parameters="action=updateconfig&reload=yes&srcfilename=extensions.conf&dstfilename=extensions.conf&"  +
 
@@ -122,15 +122,13 @@
 		var tmp = new Ajax.Request(rawman_url, opt);
 }
 
-
-function show_installed(){
-	//alert("A context [" + asterisk_guitools + "] has been added to extensions.conf" );
-	parent.astmanEngine.config2list("zapscan.conf", $('zapchan'), new Array(), zapcallbacks);
-}
-
-
-
-
+function scan_zapteldevices(){
+	parent.astmanEngine.run_tool("/sbin/zapscan.bin", onSuccess = function() { 
+					parent.astmanEngine.config2list("zapscan.conf", $('zapchan'), new Array(), zapcallbacks);
+				}
+	);
+	return;
+}
 
 zapcallbacks.format = function(t) {
 	if (t.fieldbyname['port'] == 'fxo'){
@@ -163,13 +161,21 @@
 
 
 function showResponse(originalRequest){
-			if ( originalRequest.responseText.match("Success") ) {
+			$('status_message').style.display="none";
+			if ( originalRequest.responseText.match("Success") || originalRequest.responseText.match("Invalid/unknown command")  ) {
 					getextconf();
+			}else{
+
+				alert("Invalid Password");
+				$('secret').focus();
 			}
+
 }
 
 
 function login(){
+	$('message_text').innerHTML =" Logging in ...";
+	$('status_message').style.display="block";
 		var opt = {
 			method: 'get',
 			asynchronous: true,
@@ -222,5 +228,14 @@
 			</td>
 		</tr>
 </table>
+<div ID="status_message"  STYLE="display:none; position: absolute; left: 170; top: 100; width:350; height:115;  background-color:#F4EFE5;   border-width: 1px; border-color: #7E5538; border-style: solid;">
+<BR><BR>
+<TABLE border=0 cellpadding=0 cellspacing=3 align="center">
+	<TR>
+	<TD><img src="../images/loading.gif"></TD>
+	<TD valign="middle" align="center">&nbsp;&nbsp;<div id="message_text"></div></TD>
+	</TR>
+</TABLE>
+</div>
 </BODY>
 </HTML>



More information about the asterisk-gui-commits mailing list