pari: branch 2.0 r4193 - /branches/2.0/config/configure_gui.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Fri Nov 21 16:05:40 CST 2008


Author: pari
Date: Fri Nov 21 16:05:40 2008
New Revision: 4193

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

 Add a configure page where one can configure various directories 
 and command paths used by gui.



Added:
    branches/2.0/config/configure_gui.html

Added: branches/2.0/config/configure_gui.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/configure_gui.html?view=auto&rev=4193
==============================================================================
--- branches/2.0/config/configure_gui.html (added)
+++ branches/2.0/config/configure_gui.html Fri Nov 21 16:05:40 2008
@@ -1,0 +1,88 @@
+<!--
+ * Asterisk-GUI	- an Asterisk configuration interface
+ *
+ * Add/delete/Edit "Users"
+ *
+ * Copyright (C) 2006 - 2008, Digium, Inc.
+ *
+ * Mark Spencer <markster at digium.com> 
+ * Pari Nannapaneni <pari at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ *
+-->
+<script src="js/jquery.js"></script>
+<script src="js/astman.js"></script>
+<script>
+
+var PINGINTERVAL = 30 * 1000 ; // 30 seconds
+
+var keepPinging = function(){
+	var makePingRequest = function(){
+		$.ajax({
+			type: 'GET',
+			url: ASTGUI.paths.rawman,
+			data: 'action=ping',
+			success: function(t) {
+				if( !t.toLowerCase().contains('pong') ){
+					clearInterval( KEEPPINGING );
+					alert('Session Expired!');
+				}
+			},
+			error: function(){}
+		});
+	};
+	KEEPPINGING = setInterval( makePingRequest, PINGINTERVAL);
+};
+
+
+var doLogin = function(){
+	var f = makeSyncRequest({ action :'login', username: _$('username').value, secret: _$('secret').value });
+	f = f.toLowerCase();
+	if( f.contains('authentication accepted') ){
+		keepPinging();
+		$('#Login_form').hide();
+	}else if(f.match('authentication failed') ) {
+		alert('Invalid Username or Password');
+	}
+};
+
+var localajaxinit = function(){
+
+};
+
+
+
+
+
+
+</script>
+<body>
+
+	<div id="NoScriptWarning"><noscript>You need to enable Javascript in your browser !!</noscript></div>
+
+	<div id='Login_form'>
+	<table align="center">
+		<tr>	<td colspan="2"><BR></td>
+		<tr>	<td align=right>Username:</td>
+			<td><input id="username" size=12></td>
+		</tr>
+		<tr>	<td align=right>Password:</td>
+			<td><input type="password" id="secret" size=12></td>
+		</tr>
+		<tr>	<td align='center' colspan='2'>
+				<button onclick="doLogin();">Login</button> 
+			</td>
+		</tr>
+	</table>
+	</div>
+
+</body>




More information about the asterisk-gui-commits mailing list