pari: branch appliance r221 - in /branches/appliance/config: ./
scripts/ setup/
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Tue Jan 9 15:02:24 MST 2007
Author: pari
Date: Tue Jan 9 16:02:23 2007
New Revision: 221
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=221
Log:
New changes into AADK
Modified:
branches/appliance/config/backup.html
branches/appliance/config/cfgadvanced.html
branches/appliance/config/cfgappliance.html
branches/appliance/config/cfgbasic.html
branches/appliance/config/home.html
branches/appliance/config/incoming.html
branches/appliance/config/menus.html
branches/appliance/config/numberplan.html
branches/appliance/config/scripts/astman.js
branches/appliance/config/setup/1.html
branches/appliance/config/setup/10.html
branches/appliance/config/setup/2.html
branches/appliance/config/setup/3.html
branches/appliance/config/setup/4.html
branches/appliance/config/setup/5.html
branches/appliance/config/setup/6.html
branches/appliance/config/setup/7.html
branches/appliance/config/setup/install.html
branches/appliance/config/setup/template.html
branches/appliance/config/trunks.html
Modified: branches/appliance/config/backup.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/backup.html?view=diff&rev=221&r1=220&r2=221
==============================================================================
--- branches/appliance/config/backup.html (original)
+++ branches/appliance/config/backup.html Tue Jan 9 16:02:23 2007
@@ -41,20 +41,22 @@
}
function removebkpfile(){
- $('status_message').style.display='none';
+ $('message_text').innerHTML = "Please wait while the system <BR> Generates a Backup ... ";
+ $('status_message').style.display="block";
//remove bkpfile on server
- parent.astmanEngine.run_tool("/bin/rm " + bkp_path+ bkpfile , callback=function(){} );
+ parent.astmanEngine.run_tool("/bin/rm " + bkp_path+ "conf_* -f", download_bkp );
}
function showremovebkpfile(){
- $('message_text').innerHTML = "<A href=\"#\" onclick=\"removebkpfile()\">I have downloaded the file</A><BR><BR>" + "<A href=\"./bkps/"+ bkpfile +"\">ReDownload</A>";
+ $('status_message').style.display='none';
+// $('message_text').innerHTML = "<A href=\"#\" onclick=\"removebkpfile()\">I have downloaded the file</A><BR><BR>" + "<A href=\"./bkps/"+ bkpfile +"\" onclick=\"showremovebkpfile()\">ReDownload</A>";
}
function download_bkp(){
- $('message_text').innerHTML = "Please wait while the system <BR> Generates a Backup ... ";
+
var today=new Date()
var year = today.getFullYear();
var month = addzero(today.getMonth() + 1);
@@ -63,14 +65,12 @@
var minute =addzero(today.getMinutes());
var seconds =addzero(today.getSeconds());
bkpfile = "conf_" + year + month + day + hour + minute +seconds +".tar";
-
- $('status_message').style.display="block";
parent.astmanEngine.run_tool("/bin/tar -cf "+ bkp_path + bkpfile +" /etc/asterisk/", callback=function(){
- $('status').innerHTML = " <I> Finished generating Backup ! </I>";
- $('message_text').innerHTML = "<A href=\"./bkps/"+ bkpfile +"\" onclick=\"showremovebkpfile()\">Click Here to Download</A>";
- }
- );
-
+ $('status').innerHTML = " <I> Finished generating Backup ! </I>";
+ $('status_message').style.display="none";
+ window.location.href = "./bkps/"+ bkpfile ;
+ //$('message_text').innerHTML = "<A href=\"./bkps/"+ bkpfile +"\" onclick=\"showremovebkpfile()\">Click Here to Download</A>";
+ } );
}
</script>
@@ -85,7 +85,7 @@
<tr>
<td valign="top" align="center">
<BR><BR>
- <Input type="button" onclick="download_bkp()" value="Download a Configuration backup">
+ <Input type="button" onclick="removebkpfile()" value="Download a Configuration backup">
</td>
</tr>
<tr>
Modified: branches/appliance/config/cfgadvanced.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/cfgadvanced.html?view=diff&rev=221&r1=220&r2=221
==============================================================================
--- branches/appliance/config/cfgadvanced.html (original)
+++ branches/appliance/config/cfgadvanced.html Tue Jan 9 16:02:23 2007
@@ -18,7 +18,12 @@
* at the top of the source tree.
*
-->
-
+<script>
+var browser_alert = "Asterisk Configuration GUI is currently supported in Firefox (recommended 1.5 or above) \n SeaMonkey (1.0 or above), Netscape (8.0 or above) and Opera (9.0 or above) \n\n" + "Support for other browsers is under development \n" + " and will be supported in future versions";
+if( navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Konqueror") != -1 || navigator.userAgent.indexOf("Safari") != -1 ){
+ alert(browser_alert);
+}
+</script>
<script src="scripts/prototype.js"></script>
<script src="scripts/rico.js"></script>
<script src="scripts/astman.js"></script>
@@ -41,7 +46,6 @@
var accordion;
var copyright = "Copyright ©2006 Digium, Inc. All Rights Reserved. ";
var tooltip_default = "Move the mouse over to a field to see tooltips";
- var asterisk_guitools_inextconf = 0;
eventeater.eventcb = function(msgs) {
if (loggedon == 1)
@@ -206,7 +210,9 @@
<tr height=47><td valign="bottom" align='right' bgcolor='white' height=47><img align='left' src="images/digiumlogo.gif" align="left"></td>
<td valign='bottom' align='right' bgcolor='white' colspan=2>
<!-- <a href="#" onclick=" system_link()">System Configuration</a> | -->
- <a target='_extern' href="http://www.digium.com/en/company/profile/">About Digium</a> | <a href="#">Help</a>
+ <a target='_extern' href="http://www.digium.com/en/company/profile/">About Digium</a> |
+ <a target='_extern' href="http://www.asterisknow.org/bugs">Report a Bug</a> |
+ <a href="#">Help</a>
<input type="hidden" id="login_name">
</td>
</tr>
Modified: branches/appliance/config/cfgappliance.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/cfgappliance.html?view=diff&rev=221&r1=220&r2=221
==============================================================================
--- branches/appliance/config/cfgappliance.html (original)
+++ branches/appliance/config/cfgappliance.html Tue Jan 9 16:02:23 2007
@@ -18,7 +18,12 @@
* at the top of the source tree.
*
-->
-
+<script>
+var browser_alert = "Asterisk Configuration GUI is currently supported in Firefox (recommended 1.5 or above) \n SeaMonkey (1.0 or above), Netscape (8.0 or above) and Opera (9.0 or above) \n\n" + "Support for other browsers is under development \n" + " and will be supported in future versions";
+if( navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Konqueror") != -1 || navigator.userAgent.indexOf("Safari") != -1 ){
+ alert(browser_alert);
+}
+</script>
<script src="scripts/prototype.js"></script>
<script src="scripts/rico.js"></script>
<script src="scripts/astman.js"></script>
@@ -42,7 +47,6 @@
var copyright = "Copyright ©2006 Digium, Inc. All Rights Reserved. ";
var tooltip_default = "Move the mouse over to a field to see tooltips";
var asterisk_guitools_inextconf = 0;
-
eventeater.eventcb = function(msgs) {
if (loggedon == 1)
astmanEngine.pollEvents();
@@ -191,7 +195,9 @@
<body onload="javascript:registerajax()" topmargin=1>
<table border="0" align="center" cellspacing="0" cellpadding="0" bgcolor="#dddddd" width=950 height=570>
<tr height=47><td valign="bottom" align='right' bgcolor='white' height=47><img align='left' src="images/digiumlogo.gif" align="left"></td>
- <td valign='bottom' align='right' bgcolor='white' colspan=2><a target='_extern' href="http://www.digium.com/en/company/profile/">About Digium</a> | <a href="#">Help</a>
+ <td valign='bottom' align='right' bgcolor='white' colspan=2><a target='_extern' href="http://www.digium.com/en/company/profile/">About Digium</a> |
+ <a target='_extern' href="http://www.asterisknow.org/bugs">Report a Bug</a> |
+ <a href="#">Help</a>
<input type="hidden" id="login_name">
</td>
</tr>
@@ -232,4 +238,4 @@
</td>
</tr>
</table>
-</body>
+</body>
Modified: branches/appliance/config/cfgbasic.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/cfgbasic.html?view=diff&rev=221&r1=220&r2=221
==============================================================================
--- branches/appliance/config/cfgbasic.html (original)
+++ branches/appliance/config/cfgbasic.html Tue Jan 9 16:02:23 2007
@@ -18,7 +18,12 @@
* at the top of the source tree.
*
-->
-
+<script>
+var browser_alert = "Asterisk Configuration GUI is currently supported in Firefox (recommended 1.5 or above) \n SeaMonkey (1.0 or above), Netscape (8.0 or above) and Opera (9.0 or above) \n\n" + "Support for other browsers is under development \n" + " and will be supported in future versions";
+if( navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Konqueror") != -1 || navigator.userAgent.indexOf("Safari") != -1 ){
+ alert(browser_alert);
+}
+</script>
<script src="scripts/prototype.js"></script>
<script src="scripts/rico.js"></script>
<script src="scripts/astman.js"></script>
@@ -203,7 +208,9 @@
<tr height=47><td valign="bottom" align='right' bgcolor='white' height=47><img align='left' src="images/digiumlogo.gif" align="left"></td>
<td valign='bottom' align='right' bgcolor='white' colspan=2>
<!-- <a href="#" onclick=" system_link()">System Configuration</a> | -->
- <a target='_extern' href="http://www.digium.com/en/company/profile/">About Digium</a> | <a href="#">Help</a>
+ <a target='_extern' href="http://www.digium.com/en/company/profile/">About Digium</a> |
+ <a target='_extern' href="http://www.asterisknow.org/bugs">Report a Bug</a> |
+ <a href="#">Help</a>
<input type="hidden" id="login_name">
</td>
</tr>
Modified: branches/appliance/config/home.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/home.html?view=diff&rev=221&r1=220&r2=221
==============================================================================
--- branches/appliance/config/home.html (original)
+++ branches/appliance/config/home.html Tue Jan 9 16:02:23 2007
@@ -73,13 +73,6 @@
parent.document.getElementById('logoutlink').innerHTML = "Logout";
parent.document.getElementById('logoutlink').onclick = parent.Logoff ;
parent.astmanEngine.pollEvents();
-
- if(navigator.appName.match("Microsoft")){
- alert("Asterisk Configuration GUI is currently not supported in Microsoft Internet Explorer \n"+
- "It is recommended that you use Firefox (1.5 or above) or Opera 9.x \n\n" +
- "Support for Microsoft Internet Explorer is under development \n"+
- " and will be supported in future versions");
- }
}
function loggedOff() {
Modified: branches/appliance/config/incoming.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/incoming.html?view=diff&rev=221&r1=220&r2=221
==============================================================================
--- branches/appliance/config/incoming.html (original)
+++ branches/appliance/config/incoming.html Tue Jan 9 16:02:23 2007
@@ -30,7 +30,6 @@
var editstatus ;
var old_incomingrule, old_fromprovider ;
var edit_pattern, edit_DIDtrunk, edit_action, edit_priority ;
-
user_callbacks.format = function(t, x) {
var tmp = 'DID_' + t.name;
@@ -154,6 +153,7 @@
$('save_a').disabled = true;
$('thatmatch').style.display = "none" ;
$('userscontent').style.display = "";
+ $('bg_transparent').style.display = "";
}
function edit_incomingrule(a,b,c,d){// a is pattern, b is DID_trunk, c is action, d is priority
@@ -189,6 +189,7 @@
}
$('userscontent').style.display = "";
+ $('bg_transparent').style.display ='';
}
@@ -247,6 +248,7 @@
didtrunks[temp_provider][newpattern].action = temp_action ;
addrowtotable(newpattern,temp_provider,temp_action,temp_priority) ; // a is pattern, b is DID_trunk, c is action, d is priority
$('userscontent').style.display = "none";
+ $('bg_transparent').style.display ='none';
},
onFailure: function(t) {
alert("Config Error: " + t.status + ": " + t.statusText);
@@ -301,6 +303,7 @@
didtrunks[temp_provider][newpattern].priority = temp_priority;
didtrunks[temp_provider][newpattern].action = temp_action ;
$('userscontent').style.display = "none";
+ $('bg_transparent').style.display ='none';
refreshtable();
},
onFailure: function(t) {
@@ -376,7 +379,6 @@
function localajaxinit() {
parent.astmanEngine.config2list("users.conf", $('users'), new Array(), user_callbacks);
}
-
</script>
<body id="foo" onload="localajaxinit()" bgcolor="EFEFEF">
<div class="mainscreenTitleBar">
@@ -403,9 +405,9 @@
<BR>
<center><input type="button" id="adddid" value="Add a Incoming Rule" onclick="add_incomingrule();"></center>
- <div id="userscontent" STYLE="display:none; position: absolute; left: 20; top: 40; width:475; height:190; background-color:#F4EFE5; border-width: 1px; border-color: #7E5538; border-style: solid;">
- <table width="100%" cellpadding=0 cellspacing=0>
- <TR bgcolor="#7E5538" ><TD Height="20" align="right">
+ <div id="userscontent" STYLE="display:none; position: absolute; left: 20; top: 40; width:475; height:190; background-color:#F4EFE5; border-width: 1px; border-color: #7E5538; border-style: solid;z-index:5">
+ <table width="100%" cellpadding=0 cellspacing=0 onmousedown="startDrag(event , 'userscontent');">
+ <TR bgcolor="#7E5538"><TD Height="20" align="right" style="cursor: move">
<A href="#" onclick="$('cancel_a').click();"><font style="color:#FFFFFF; font-size: 12px; font-weight:bold;">X</font></A>
</TD>
<TD width=4></TD>
@@ -428,11 +430,13 @@
<TR>
<TD align=center height=50 valign=middle>
<input type="button" id="save_a" value="Save" onclick="save_incomingrule();">
- <input type="button" id="cancel_a" value="Cancel" onclick="$('userscontent').style.display='none';" >
+ <input type="button" id="cancel_a" value="Cancel" onclick="$('userscontent').style.display='none'; $('bg_transparent').style.display ='none';" >
</TD>
</TR>
</TABLE>
</div>
+</div>
+<div id="bg_transparent" STYLE="display:none; position: absolute; left: 0; top: 24; width:100%; height:100%; background-color:#FFFFFF; filter:alpha(opacity=50); -moz-opacity:.50;opacity:.50; border-width: 1px; border-color: #7E5538; border-style: solid; z-index:4">
</div>
<SCRIPT LANGUAGE="JavaScript">
<!--
Modified: branches/appliance/config/menus.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/menus.html?view=diff&rev=221&r1=220&r2=221
==============================================================================
--- branches/appliance/config/menus.html (original)
+++ branches/appliance/config/menus.html Tue Jan 9 16:02:23 2007
@@ -715,8 +715,7 @@
priority_1 = tmp[1];
tmp = $('steps').options[y-1].value.split(",") ;
priority_2 = tmp[1];
-
- if (priority_2 > priority_1){
+ if (priority_2 - priority_1 > 0){
buffer = $('steps').options[y-1].value;
$('steps').options[y-1].value = $('steps').options[y].value;
$('steps').options[y].value = buffer;
@@ -726,6 +725,7 @@
}
}
}
+
$('steps').disabled = false;
$('comment').disabled = false;
Modified: branches/appliance/config/numberplan.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/numberplan.html?view=diff&rev=221&r1=220&r2=221
==============================================================================
--- branches/appliance/config/numberplan.html (original)
+++ branches/appliance/config/numberplan.html Tue Jan 9 16:02:23 2007
@@ -138,6 +138,7 @@
}
}
// now show this object in a table.
+ var rules_nosp = new Array ;
for( var x in default_np_data ){ // x is the pattern
// sort the priorities
if ( x == "extend"){ break;}
@@ -159,8 +160,7 @@
}
}
if ( default_np_data[x][sorted_priorities[z]].trunk == "" ){
- alert("Note: A Service Provider is not defined for this Rule ("+default_np_data[x][sorted_priorities[z]].rulename+")\n");
- $('trunks').selectedIndex = -1;
+ rules_nosp.push(default_np_data[x][sorted_priorities[z]].rulename) ;
//editcallingrule(x , sorted_priorities[z]);
//return true;
addrowtotable( x , sorted_priorities[z] , "undefined" , default_np_data[x][sorted_priorities[z]].digits2strip );
@@ -173,6 +173,10 @@
}
}
}
+ if(rules_nosp.length > 0 ){
+ $('status').innerHTML = "Note: A Service Provider is not defined for the Rules <BR>" + rules_nosp ;
+ $('trunks').selectedIndex = -1;
+ }
}
numplan_callbacks.eachline = true;
@@ -243,6 +247,7 @@
};
opt.parameters= "action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("extensions.conf") + "&dstfilename=" + encodeURIComponent("extensions.conf") + uri;
$('userscontent').style.display="none";
+ $('bg_transparent').style.display ='none';
$('status_message').style.display="block";
var tmp = new Ajax.Request("../../rawman", opt);
}
@@ -281,6 +286,7 @@
}
$('userscontent').style.display="";
+ $('bg_transparent').style.display ='';
$('addrule').disabled =1;
}
@@ -348,6 +354,7 @@
$('define_advanced').style.display="none";
$('define_usual').style.display="";
$('userscontent').style.display="";
+ $('bg_transparent').style.display ='';
$('addrule').disabled =1;
$('beginswith').value = "";
$('followedby').value ="";
@@ -380,6 +387,7 @@
};
opt.parameters= "action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("extensions.conf") + "&dstfilename=" + encodeURIComponent("extensions.conf") + uri;
$('userscontent').style.display="none";
+ $('bg_transparent').style.display ='none';
$('status_message').style.display="block";
var tmp = new Ajax.Request("../../rawman", opt);
}
@@ -456,9 +464,9 @@
<BR>
<center><input type="button" id="addrule" value="Add a Calling Rule" onclick="add_callingrule();"></center>
- <div id="userscontent" STYLE="display:none; position: absolute; left: 20; top: 40; width:500; height:290; background-color:#F4EFE5; border-width: 1px; border-color: #7E5538; border-style: solid;">
- <table width="100%" cellpadding=0 cellspacing=0>
- <TR bgcolor="#7E5538" ><TD Height="20" align="right">
+ <div id="userscontent" STYLE="display:none; position: absolute; left: 20; top: 40; width:500; height:290; background-color:#F4EFE5; border-width: 1px; border-color: #7E5538; border-style: solid; z-index:5">
+ <table width="100%" cellpadding=0 cellspacing=0 onmousedown="startDrag(event , 'userscontent');">
+ <TR bgcolor="#7E5538" ><TD Height="20" align="right" style="cursor: move">
<A href="#" onclick="$('cancel_a').click();"><font style="color:#FFFFFF; font-size: 12px; font-weight:bold;">X</font></A>
</TD>
<TD width=4></TD>
@@ -502,13 +510,15 @@
<TR>
<TD colspan=2 align=center height=50 valign=middle>
<input type="button" id="save_a" value="Save" onclick="saverule();">
- <input type="button" id="cancel_a" value="Cancel" onclick="$('userscontent').style.display='none'; $('addrule').disabled =0;" >
+ <input type="button" id="cancel_a" value="Cancel" onclick="$('userscontent').style.display='none'; $('bg_transparent').style.display ='none'; $('addrule').disabled =0;">
</TD>
</TR>
</TABLE>
</div>
+</div>
+<div id="bg_transparent" STYLE="display:none; position: absolute; left: 0; top: 24; width:100%; height:100%; background-color:#FFFFFF; filter:alpha(opacity=50); -moz-opacity:.50;opacity:.50; border-width: 1px; border-color: #7E5538; border-style: solid; z-index:4">
</div>
<SCRIPT LANGUAGE="JavaScript">
<!--
Modified: branches/appliance/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/scripts/astman.js?view=diff&rev=221&r1=220&r2=221
==============================================================================
--- branches/appliance/config/scripts/astman.js (original)
+++ branches/appliance/config/scripts/astman.js Tue Jan 9 16:02:23 2007
@@ -24,6 +24,31 @@
var asterisk_guitoolsversion = "0.7";
var asterisk_guiversion = "$Revision$";
var sortbynames = false;
+var dragdata = new Object;
+
+function startDrag(event, movethis ){
+ dragdata.movethis = movethis ;
+ dragdata.initialcursorX = event.clientX + window.scrollX;
+ dragdata.initialcursorY = event.clientY + window.scrollY;
+ dragdata.initialwindowleft = parseInt( $(dragdata.movethis).style.left) ;
+ dragdata.initialwindowtop = parseInt($(dragdata.movethis).style.top) ;
+ document.addEventListener("mousemove", movewindow, false);
+ document.addEventListener("mouseup", stopDrag, false);
+}
+
+
+function stopDrag(){
+ document.removeEventListener("mousemove", movewindow, false);
+ document.removeEventListener("mouseup", stopDrag, false);
+}
+
+function movewindow(event){
+ x = event.clientX + window.scrollX;
+ y = event.clientY + window.scrollY;
+ $(dragdata.movethis).style.left = (dragdata.initialwindowleft + x - dragdata.initialcursorX) + "px";
+ $(dragdata.movethis).style.top = (dragdata.initialwindowtop + y - dragdata.initialcursorY) + "px";
+}
+
function check_patternonfields(fields){
// for checking validity of field contents before form submitting
Modified: branches/appliance/config/setup/1.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/setup/1.html?view=diff&rev=221&r1=220&r2=221
==============================================================================
--- branches/appliance/config/setup/1.html (original)
+++ branches/appliance/config/setup/1.html Tue Jan 9 16:02:23 2007
@@ -1,6 +1,6 @@
<HTML>
<HEAD>
- <TITLE> Asterik GUI Setup Wizard</TITLE>
+ <TITLE> Asterisk GUI Setup Wizard</TITLE>
<link href="setup.css" media="all" rel="Stylesheet" type="text/css" />
</HEAD>
<script src="../scripts/prototype.js"></script>
@@ -46,6 +46,9 @@
}
function getextconf(){
+ parent.loggedon = 1;
+ parent.astmanEngine.pollEvents();
+
var opt = {
method: 'get',
asynchronous: true,
@@ -133,11 +136,11 @@
zapcallbacks.format = function(t) {
if (t.fieldbyname['port'] == 'fxo'){
parent.fxoports.push(t.name);
- return "Analog(FXO) Port #" + t.name;
+ return "Analog(FXS) Port #" + t.name;
}
if (t.fieldbyname['port'] == 'fxs'){
parent.fxsports.push(t.name);
- return "Analog(FXS) Port #" + t.name;
+ return "Analog(FXO) Port #" + t.name;
}
return null;
}
@@ -155,7 +158,7 @@
$('loginform').style.display = "none";
$('zapinfo').style.display = "block";
parent.$('next').disabled = false;
- parent.$('next').onclick = function(){ window.location.href="3.html"; };
+ parent.$('next').onclick = function(){ window.location.href="2.html"; };
$('menu').style.display = "block";
}
@@ -194,6 +197,7 @@
<table cellpadding=3 cellspacing=2 border=0 id="sidelist">
<tr><td width=3></td><td>Start</td></tr>
<tr><td></td><td class="slselected">Verify Analog Ports</td></tr>
+ <tr><td></td><td>Date & Time</td></tr>
<tr><td></td><td>Local Extension Settings</td></tr>
<tr><td></td><td>Service Providers</td></tr>
<tr><td></td><td>Calling Rules</td></tr>
@@ -210,8 +214,8 @@
<div id="loginform" style="display:none">
<div class="heading">Pleae enter your admin Username and Password </div>
<table align="center">
- <tr><td>Username:</td> <td><input id="username" size=12 value=admin></td> </tr>
- <tr><td>Secret:</td> <td><input type="password" id="secret" size=12 value=secret></td> </tr>
+ <tr><td>Username:</td> <td><input id="username" size=12></td> </tr>
+ <tr><td>Secret:</td> <td><input type="password" id="secret" size=12></td> </tr>
<tr><td align='center' colspan='2' height=40 valign=bottom>
<input type="button" id="login" value="Login" onClick="login()" >
</td>
@@ -237,4 +241,4 @@
</TABLE>
</div>
</BODY>
-</HTML>
+</HTML>
Modified: branches/appliance/config/setup/10.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/setup/10.html?view=diff&rev=221&r1=220&r2=221
==============================================================================
--- branches/appliance/config/setup/10.html (original)
+++ branches/appliance/config/setup/10.html Tue Jan 9 16:02:23 2007
@@ -1,6 +1,6 @@
<HTML>
<HEAD>
- <TITLE> Asterik GUI Setup Wizard</TITLE>
+ <TITLE> Asterisk GUI Setup Wizard</TITLE>
<link href="setup.css" media="all" rel="Stylesheet" type="text/css" />
</HEAD>
<script src="../scripts/prototype.js"></script>
@@ -13,7 +13,7 @@
function localinit(){
//parent.$('next').disabled = true;
- parent.$('next').onclick = function(){ parent.window.location.href ="../cfgappliance.html"; };
+ parent.$('next').onclick = function(){ parent.window.location.href ="../cfgbasic.html"; };
parent.$('back').disabled = false;
parent.$('back').onclick = function(){ window.location.href="7.html"; };
rawman_url = parent.rawman_url ;
@@ -39,7 +39,7 @@
if ( originalRequest.responseText.match("Pong") ) {
// load default numbnerplan settings
-
+ parent.astmanEngine.pollEvents();
}
}
@@ -52,6 +52,7 @@
<table cellpadding=3 cellspacing=2 border=0 id="sidelist">
<tr><td width=3></td><td>Start</td></tr>
<tr><td></td><td>Verify Analog Ports</td></tr>
+ <tr><td></td><td>Date & Time</td></tr>
<tr><td></td><td>Local Extension Settings</td></tr>
<tr><td></td><td>Service Providers</td></tr>
<tr><td></td><td>Calling Rules</td></tr>
Modified: branches/appliance/config/setup/2.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/setup/2.html?view=diff&rev=221&r1=220&r2=221
==============================================================================
--- branches/appliance/config/setup/2.html (original)
+++ branches/appliance/config/setup/2.html Tue Jan 9 16:02:23 2007
@@ -1,6 +1,6 @@
<HTML>
<HEAD>
- <TITLE> Asterik GUI Setup Wizard</TITLE>
+ <TITLE> Asterisk GUI Setup Wizard</TITLE>
<link href="setup.css" media="all" rel="Stylesheet" type="text/css" />
</HEAD>
<script src="../scripts/prototype.js"></script>
@@ -19,12 +19,14 @@
function localinit(){
- parent.$('next').disabled = true;
- parent.$('next').onclick = "";
+ parent.$('next').disabled = false;
+ parent.$('next').onclick = function(){
+ window.location.href="3.html";
+ };
parent.$('back').disabled = false;
parent.$('back').onclick = function(){ window.location.href="1.html"; };
rawman_url = parent.rawman_url ;
- parent.astmanEngine.setURL(rawman_url);
+ //parent.astmanEngine.setURL(rawman_url);
ping();
}
@@ -54,23 +56,28 @@
function update_sysinfo(){
parent.astmanEngine.run_tool("sh /etc/asterisk/gui_sysinfo", onSuccess = function() {
- parent.astmanEngine.config2list("gui_sysinfo.conf", $('sysinfo'), new Array(), sysinfocallbacks);
- }
- );
+ var opt = {
+ method: 'get',
+ asynchronous: true,
+ onComplete: function(originalRequest){
+ $('sysinfo').innerHTML = originalRequest.responseText;
+ today = $('si_date').innerHTML;
+ parent.astmanEngine.pollEvents();
+ sysinfocallbacks_loaded();
+ },
+ onFailure: function(t) {
+ alert("Config Error: " + t.status + ": " + t.statusText);
+ }
+ };
+ opt.parameters="";
+ var tmp = new Ajax.Request("../bkps/sysinfo_output.html", opt);
+ return true;
+ });
return;
}
-sysinfocallbacks.format = function(t, x) {
- if ( t.name == 'today' && x==undefined ){ // if is a category
- return t.name;
- }else if( t.name == 'today' ){ // if is a subcategory
- today = t.fields[x] ;
- }else{
- return false;
- }
-}
-
-sysinfocallbacks.loaded = function(){
+
+function sysinfocallbacks_loaded(){
var temp = today.split(" ");
if(temp[2] == ""){ temp.splice(2,1) ; }
var dayofweek = temp[0]; // Fri
@@ -79,7 +86,7 @@
var timeofday = temp[3]; // 23:59:59
var timezone = temp[4]; // CST
var year = temp[5]; // 2006
-
+
for(var i=0; i < $('moy').length; i++){
if ( $('moy').options[i].value.toLowerCase() == monthofyear.toLowerCase() ){
$('moy').selectedIndex = i;
@@ -123,8 +130,6 @@
}
}
}
-
-
for(var i=0; i < $('minute').length; i++){
if ( $('minute').options[i].value == parseFloat(temp[1]) ){
@@ -138,6 +143,12 @@
break;
}
}
+ for(var i=0; i < $('year').length; i++){
+ if ( $('year').options[i].value == parseFloat(year) ){
+ $('year').selectedIndex = i;
+ break;
+ }
+ }
parent.$('next').disabled = false;
parent.$('next').onclick = function(){
@@ -148,9 +159,6 @@
window.location.href="3.html";
};
}
-
-sysinfocallbacks.eachline = true;
-sysinfocallbacks.includecats = true;
function update_systemdate(){
var opt = {
@@ -209,7 +217,7 @@
</td>
<td valign=top align=center>
<!-- this page -->
- <select id='sysinfo' style="display:none"></select>
+ <div id='sysinfo' style="display:none"></div>
<div class="heading">Step 2 of <script>document.write(parent.numberofsteps);</script> - Date & Time Settings</div>
<div class="subheading">Current System Time </div>
<TABLE cellpadding=6 cellspacing=1 border=0 class="timeinfo">
Modified: branches/appliance/config/setup/3.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/setup/3.html?view=diff&rev=221&r1=220&r2=221
==============================================================================
--- branches/appliance/config/setup/3.html (original)
+++ branches/appliance/config/setup/3.html Tue Jan 9 16:02:23 2007
@@ -1,6 +1,6 @@
<HTML>
<HEAD>
- <TITLE> Asterik GUI Setup Wizard</TITLE>
+ <TITLE> Asterisk GUI Setup Wizard</TITLE>
<link href="setup.css" media="all" rel="Stylesheet" type="text/css" />
</HEAD>
<script src="../scripts/prototype.js"></script>
@@ -12,7 +12,7 @@
var widgets = new Array;
var go = "";
var nextpage = "4.html";
-var prevpage = "1.html";
+var prevpage = "2.html";
function localinit(){
parent.$('next').disabled = true;
@@ -85,6 +85,7 @@
usercallbacks.loaded = function(){
+ parent.astmanEngine.pollEvents();
$('devices').selectitem(0);
parent.$('next').disabled = false;
parent.$('back').disabled = false;
@@ -113,6 +114,7 @@
<table cellpadding=3 cellspacing=2 border=0 id="sidelist">
<tr><td width=3></td><td>Start</td></tr>
<tr><td></td><td>Verify Analog Ports</td></tr>
+ <tr><td></td><td>Date & Time</td></tr>
<tr><td></td><td class="slselected">Local Extension Settings</td></tr>
<tr><td></td><td>Service Providers</td></tr>
<tr><td></td><td>Calling Rules</td></tr>
@@ -126,7 +128,7 @@
<td valign=top align=center>
<!-- this page -->
<select id="devices" style="display:none"></select> <input type=button id="save" value="Submit" style="display:none">
- <div class="heading">Step 2 of <script>document.write(parent.numberofsteps);</script> - Local Extension Settings</div>
+ <div class="heading">Step 3 of <script>document.write(parent.numberofsteps);</script> - Local Extension Settings</div>
<p class="subheading"> Local Extensions are <select id="localextenlength">
<option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select> digits long
</p>
Modified: branches/appliance/config/setup/4.html
URL: http://svn.digium.com/view/asterisk-gui/branches/appliance/config/setup/4.html?view=diff&rev=221&r1=220&r2=221
==============================================================================
--- branches/appliance/config/setup/4.html (original)
+++ branches/appliance/config/setup/4.html Tue Jan 9 16:02:23 2007
@@ -1,6 +1,6 @@
<HTML>
<HEAD>
- <TITLE> Asterik GUI Setup Wizard</TITLE>
+ <TITLE> Asterisk GUI Setup Wizard</TITLE>
<link href="setup.css" media="all" rel="Stylesheet" type="text/css" />
</HEAD>
<script src="../scripts/prototype.js"></script>
@@ -22,7 +22,40 @@
'insecure', 'host', 'fromuser', 'fromdomain');
var provfieldnames = new Array('providerdesc', 'providerlogo');
-
+var isnewtrunk;
+
+ function add_didcontext(trunk){
+ var didcontext = "DID_" + trunk ;
+ var uri = build_action('newcat', 0, didcontext ,"", "");
+ uri += build_action('append', 1, didcontext ,"include", "default");
+ var opt = {
+ method: 'get',
+ asynchronous: true,
+ onSuccess: function(t) { },
+ onFailure: function(t) {
+ alert("Config Error: " + t.status + ": " + t.statusText);
+ alert("Failed to create a DID context for " + trunk);
+ }
+ };
+ opt.parameters= "action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("extensions.conf") + "&dstfilename=" + encodeURIComponent("extensions.conf") + uri;
+ var tmp = new Ajax.Request(rawman_url, opt);
+ }
+
+ function delete_didcontext(trunk){
+ var didcontext = "DID_" + trunk ;
+ var uri = build_action('delcat', 0, didcontext ,"", "");
+ var opt = {
+ method: 'get',
+ asynchronous: true,
+ onSuccess: function(t) { },
+ onFailure: function(t) {
+ alert("Config Error: " + t.status + ": " + t.statusText);
+ alert("Failed to delete DID context for " + trunk);
+ }
+ };
+ opt.parameters= "action=updateconfig&reload=yes&srcfilename=" + encodeURIComponent("extensions.conf") + "&dstfilename=" + encodeURIComponent("extensions.conf") + uri;
+ var tmp = new Ajax.Request(rawman_url, opt);
+ }
@@ -109,11 +142,11 @@
}
callbacks.loaded = function() {
+ parent.astmanEngine.pollEvents();
$('devices').contentEditable = 'true';
$('devices').disabled = 0;
$('new').addEventListener("click", showSPdetails, false);
loadServiceProvidersintotable();
- parent.loadscreen(this);
}
callbacks.postselect = function(){
@@ -130,6 +163,12 @@
$('customvoip_protocol').selectedIndex = 0;
}
$('customvoip_host').value = $('host').value;
+ if($('registeriax').value == "yes" || $('registersip').value == "yes"){
+ $('customvoip_register').checked = true;
+ }else{
+ $('customvoip_register').checked = false;
+ }
+
}else if ( $('trunkstylevoip').checked ){
// VOIP
$('customvoip_name').value = "";
@@ -144,6 +183,7 @@
callbacks.delchanges = function(box, value) {
deletesp_fromui(value);
+ delete_didcontext(value);
var oldvalue = $('hiddenglobals').stored_config.catbyname['globals'].fieldbyname[value];
if (oldvalue) {
uri = build_action('delete', 0, 'globals', value, "");
@@ -160,6 +200,9 @@
}
callbacks.savechanges = function() {
+ if(isnewtrunk ==1){ //New Trunk created , add [DID_trunk_x] in extensions.conf
+ add_didcontext($('devices').value);
+ }
saveSPdetails();
var uri;
var newvalue;
@@ -246,6 +289,7 @@
alert("When using Analog, at least one port must be selected.");
return true;
}
+ $('provider').selectedIndex = -1;
count = 0;
$('trunkname').value = "";
for (var x=0;x<$('zapchan').options.length;x++) {
@@ -280,10 +324,20 @@
$('hassip').value = "yes";
$('hasiax').value = "no";
}
+ if( $('customvoip_register').checked && $('customvoip_protocol').value == "iax"){
+ $('registeriax').value = 'yes';
+ $('registersip').value = 'no';
+ }
+ if( $('customvoip_register').checked && $('customvoip_protocol').value == "sip"){
+ $('registeriax').value = 'no';
+ $('registersip').value = 'yes';
+ }
+ if( !$('customvoip_register').checked ){
+ $('registeriax').value = 'no';
+ $('registersip').value = 'no';
+ }
$('host').value = $('customvoip_host').value ;
$('dialformat').value = '${EXTEN:1}';
- $('registeriax').value = '';
- $('registersip').value = '';
$('callerid').value = '';
$('insecure').value = '';
$('port').value = '';
@@ -312,12 +366,17 @@
tmp.name = 'trunk_' + x;
}
tmp.fieldbyname['hasexten'] = 'no';
+ tmp.fieldbyname['context'] = 'DID_'+tmp.name;
$('customvoip_name').value = "";
$('customvoip_username').value = "";
$('customvoip_secret').value = "";
$('customvoip_protocol').selectedIndex = 0;
$('customvoip_host').value ="";
-
+ $('analog').style.display="none";
+ $('voip').style.display="none";
+ $('customvoip').style.display="none";
+ $('userscontent_title').innerHTML = "Add Service Provider";
+ isnewtrunk = 1;
return tmp;
}
@@ -351,14 +410,15 @@
function activateanalogvoip() {
+ $('analog').style.display = "none";
+ $('zapchan').style.display = "none";
+ $('zapchan_analoglines').style.display = "none";
+ $('zapchan_analoglines').innerHTML ="";
+ $('customvoip').style.display = "none" ;
+ $('voip').style.display= "none";
if ($('trunkstyleanalog').checked) {
$('analog').style.display = "block";
- $('zapchan').style.display = "none";
$('zapchan_analoglines').style.display = "block";
- $('zapchan_analoglines').innerHTML ="";
- $('customvoip').style.display = "none" ;
- $('voip').style.display= "none";
-
if($('zapchan').options.length ==0){
$('zapchan_analoglines').innerHTML = "No analog line hardware installed on the system";
}else{
@@ -373,20 +433,10 @@
}
}else if ($('trunkstylevoip').checked) {
$('voip').style.display = "block";
- $('analog').style.display = 'none';
$('voip').style.height =350;
- $('zapchan_analoglines').style.display = "none";
- $('zapchan_analoglines').innerHTML ="";
- $('customvoip').style.display = "none" ;
}else if ($('trunkstylecustomvoip').checked) {
- $('analog').style.display= "none";
- $('voip').style.display= "none";
$('customvoip').style.display = "block" ;
- $('zapchan_analoglines').style.display = "none";
- $('zapchan_analoglines').innerHTML ="";
- }
-
-
+ }
}
function localajaxinit() {
@@ -479,6 +529,8 @@
}
function editSP(sp_value){
+ isnewtrunk = 0;
+ $('userscontent_title').innerHTML = "Edit Service Provider";
for(var i=0; i< $('devices').length; i++){
if(sp_value == $('devices').options[i].value ){
$('devices').selectitem(i);
@@ -495,11 +547,13 @@
function hideSPdetails(){
$('userscontent').style.display = "none";
+ $('bg_transparent').style.display = "none";
}
function showSPdetails(){
$('cancel').disabled = false;
$('userscontent').style.display = "block";
+ $('bg_transparent').style.display = "block";
}
function deleteSP(trunk){
@@ -526,6 +580,22 @@
}
}
+function flip_register(){
+ $('cancel').disabled= false;
+ $('save').disabled= false;
+ if( $('customvoip_register').checked && $('customvoip_protocol').value == "iax"){
+ $('registeriax').value = 'yes';
+ $('registersip').value = 'no';
+ }
+ if( $('customvoip_register').checked && $('customvoip_protocol').value == "sip"){
+ $('registeriax').value = 'no';
+ $('registersip').value = 'yes';
+ }
+ if( !$('customvoip_register').checked ){
+ $('registeriax').value = 'no';
+ $('registersip').value = 'no';
+ }
+}
//-->
</SCRIPT>
@@ -536,6 +606,7 @@
<table cellpadding=3 cellspacing=2 border=0 id="sidelist">
<tr><td width=3></td><td>Start</td></tr>
<tr><td></td><td>Verify Analog Ports</td></tr>
+ <tr><td></td><td>Date & Time</td></tr>
<tr><td></td><td>Local Extension Settings</td></tr>
<tr><td></td><td class="slselected">Service Providers</td></tr>
[... 532 lines stripped ...]
More information about the asterisk-gui-commits
mailing list