pari: branch aadk r490 - /branches/aadk/config/networking.html
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Mon Mar 26 15:49:52 MST 2007
Author: pari
Date: Mon Mar 26 17:49:52 2007
New Revision: 490
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=490
Log:
trying to make the networking stuff work - we still need the backend script that will actually apply these settings on the device
Modified:
branches/aadk/config/networking.html
Modified: branches/aadk/config/networking.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/networking.html?view=diff&rev=490&r1=489&r2=490
==============================================================================
--- branches/aadk/config/networking.html (original)
+++ branches/aadk/config/networking.html Mon Mar 26 17:49:52 2007
@@ -18,96 +18,45 @@
* at the top of the source tree.
*
-->
-
<script src="scripts/prototype.js"></script>
<script src="scripts/rico.js"></script>
<script src="scripts/astman.js"></script>
<link href="stylesheets/rico.css" media="all" rel="Stylesheet" type="text/css" />
<link href="stylesheets/schwing.css" media="all" rel="Stylesheet" type="text/css" />
+<script>
+ var nwfields = ["DHCP_WAN", "IP_WAN", "SUBNET_WAN","NETMASK_WAN", "GATEWAY_WAN","DNS_WAN","DHCP_LAN", "IP_LAN", "SUBNET_LAN","NETMASK_LAN", "GATEWAY_LAN", "DNS_LAN", "ROUTER_IPRANGE", "SSH_STATUS", "status", "save", "cancel"];
+ var widgets = {};
+ var networkingcallbacks = {};
-<script>
- var origwidth;
- var vmwidgets = new Array;
- var widgets = new Array;
- var vmexten='';
- var adstatus;
- var networkings;
- var callbacks = new Object;
- var usercallbacks = new Object;
- var networkingcallbacks = new Object;
- var vmfields = new Array('status', 'save', 'cancel',
- 'HOSTNAME', 'ESSID', 'WEPKEY', 'SUBBLOCK', 'ALTSUBBLOCK', 'NETMASK', 'DHCPSTARTUNIT', 'DHCPCOUNT','SSHACCESS');
-
- var fields = new Array('name');
-
- function newexten() {
- var newname = $('name').value;
- $('save').disabled = false;
+ networkingcallbacks.format = function(t, x) {
+ if (t.name != 'general')
+ return null;
+ return "General";
}
- usercallbacks.format = function(t) {
- if ((t.name == 'general'))
- return null;
- if (t.name.substring(0,6) == 'trunk_')
- return null;
- if (t.fieldbyname['fullname'] && t.fieldbyname['fullname'].length) {
- return t.name + " -- " + t.fieldbyname['fullname'];
- } else
- return t.name;
+ networkingcallbacks.loaded = function(t, x) {
+ $('hiddennetworking').selectitem(0);
+ parent.loadscreen(this);
}
- function togglefeatures() {
- if (adstatus == "shown") {
- adstatus = "hidden";
- new Rico.Effect.Size('advancedw', null, 1, 120, 8, {complete:function() { $('advancedw').style.height=1;} } );
- } else {
- adstatus = "shown";
- $('advancedw').style.visibility = "visible";
- new Rico.Effect.Size('advancedw', null, 180, 120, 8 );
- }
+
+ networkingcallbacks.savechanges = function(){
+ //parent.astmanEngine.run_tool("sh /etc/asterisk/apply_networking.sh", callback = function() {
+ // any Javascript you want to execute after apply_networking is executed.
+ //} );
}
-
-
- networkingcallbacks.loaded = function() {
- $('hiddennetworking').selectedIndex = 0;
- if ($('hiddennetworking').onchange)
- $('hiddennetworking').onchange($('hiddennetworking'));
- parent.astmanEngine.config2list("users.conf", $('hiddenusers'), new Array(), usercallbacks);
- }
-
- networkingcallbacks.loaded = function() {
- $('hiddennetworking').selectedIndex = 0;
- if ($('hiddennetworking').onchange)
- $('hiddennetworking').onchange($('hiddenvoicemail'));
- parent.loadscreen(this);
- }
-
- networkingcallbacks.format = function(t) {
- if (t.name != 'general')
- return null;
- return "General";
- }
-
+
+
function localajaxinit() {
setWindowTitle("Network Settings");
- $('advancedw').style.overflow = "hidden";
- $('advancedw').style.height = 1;
- $('advancedw').style.width = $('split').width;
- $('advancedi').style.width = $('split').width - 60;
- adstatus = "hidden";
- for (var x =0 ; x < vmfields.length; x++) {
- vmwidgets[vmfields[x]] = $(vmfields[x]);
- vmwidgets[vmfields[x]].disabled = true;
+
+ for (var x =0; x < nwfields.length; x++ ) {
+ widgets[nwfields[x]] = $(nwfields[x]);
+ widgets[nwfields[x]].disabled = true;
}
- for (var x =0; x < fields.length; x++) {
- widgets[fields[x]] = $(fields[x]);
- widgets[fields[x]].disabled = true;
- }
- parent.astmanEngine.config2list("networking.conf", $('hiddennetworking'), vmwidgets, networkingcallbacks);
+ parent.astmanEngine.config2list("networking.conf", $('hiddennetworking'), widgets, networkingcallbacks);
}
</script>
-
-
<body id="foo" onload="localajaxinit()" bgcolor="EFEFEF">
<div class="mainscreenTitleBar">
<span style="margin-left: 4px;font-weight:bold;">Networking Configuration</span>
@@ -115,126 +64,70 @@
</div>
<div class="mainscreenContentBox" id="mailboxcontent">
<table class="mainscreenTable" align="center">
- <tr valign="top"><td height=20></td> </tr>
- <tr valign="top">
- <td height=395 align=center>
- <div id='adjustments'>
- <table cellspacing='0' cellpadding='0'>
- <tr valign="top"><td>
- <table>
- <tr><td>Operating Mode:</td><td><select id='OPERMODE'>
- <option value='FCC'>FCC (US, Canada)</option>
- <option value='TBR21'>TBR21 (Most of Europe)</option>
- <option value="ARGENTINA">Argentina</option>
- <option value="AUSTRALIA">Australia</option>
- <option value="AUSTRIA">Austria</option>
- <option value="BAHRAIN">Bahrain</option>
- <option value="BELGIUM">Belgium</option>
- <option value="BRAZIL">Brazil</option>
- <option value="BULGARIA">Bulgaria</option>
- <option value="CANADA">Canada</option>
- <option value="CHILE">Chile</option>
- <option value="CHINA">China</option>
- <option value="COLUMBIA">Columbia</option>
- <option value="CROATIA">Croatia</option>
- <option value="CYRPUS">Cyrpus</option>
- <option value="CZECH">Czech</option>
- <option value="DENMARK">Denmark</option>
- <option value="ECUADOR">Ecuador</option>
- <option value="EGYPT">Egypt</option>
- <option value="ELSALVADOR">Elsalvador</option>
- <option value="FINLAND">Finland</option>
- <option value="FRANCE">France</option>
- <option value="GERMANY">Germany</option>
- <option value="GREECE">Greece</option>
- <option value="GUAM">Guam</option>
- <option value="HONGKONG">Hongkong</option>
- <option value="HUNGARY">Hungary</option>
- <option value="ICELAND">Iceland</option>
- <option value="INDIA">India</option>
- <option value="INDONESIA">Indonesia</option>
- <option value="IRELAND">Ireland</option>
- <option value="ISRAEL">Israel</option>
- <option value="ITALY">Italy</option>
- <option value="JAPAN">Japan</option>
- <option value="JORDAN">Jordan</option>
- <option value="KAZAKHSTAN">Kazakhstan</option>
- <option value="KUWAIT">Kuwait</option>
- <option value="LATVIA">Latvia</option>
- <option value="LEBANON">Lebanon</option>
- <option value="LUXEMBOURG">Luxembourg</option>
- <option value="MACAO">Macao</option>
- <option value="MALAYSIA">Malaysia</option>
- <option value="MALTA">Malta</option>
- <option value="MEXICO">Mexico</option>
- <option value="MOROCCO">Morocco</option>
- <option value="NETHERLANDS">Netherlands</option>
- <option value="NEWZEALAND">Newzealand</option>
- <option value="NIGERIA">Nigeria</option>
- <option value="NORWAY">Norway</option>
- <option value="OMAN">Oman</option>
- <option value="PAKISTAN">Pakistan</option>
- <option value="PERU">Peru</option>
- <option value="PHILIPPINES">Philippines</option>
- <option value="POLAND">Poland</option>
- <option value="PORTUGAL">Portugal</option>
- <option value="ROMANIA">Romania</option>
- <option value="RUSSIA">Russia</option>
- <option value="SAUDIARABIA">Saudiarabia</option>
- <option value="SINGAPORE">Singapore</option>
- <option value="SLOVAKIA">Slovakia</option>
- <option value="SLOVENIA">Slovenia</option>
- <option value="SOUTHAFRICA">Southafrica</option>
- <option value="SOUTHKOREA">Southkorea</option>
- <option value="SPAIN">Spain</option>
- <option value="SWEDEN">Sweden</option>
- <option value="SWITZERLAND">Switzerland</option>
- <option value="SYRIA">Syria</option>
- <option value="TAIWAN">Taiwan</option>
- <option value="THAILAND">Thailand</option>
- <option value="UAE">UAE</option>
- <option value="UK">UK</option>
- <option value="USA">USA</option>
- <option value="YEMEN">Yemen</option>
- </select></td></tr>
- <tr><td>Hostname:</td><td><input type='text' id='HOSTNAME'></td></tr>
- <tr><td>ESSID:</td><td><input type='text' id='ESSID'></td></tr>
- <tr><td>WEP Key:</td><td><input type='text' id='WEPKEY'></td></tr>
- <tr><td>SSH Access:</td><td><select id='SSHACCESS'><option value=''>Disabled</option><option value='yes'>Enabled</option></select></td></tr>
- <tr><td colspan='2' align='center'><div style="height:15px" id='status'></div></td></tr>
- </table>
- </td>
- </tr>
- <tr><td><img id="split" onClick="togglefeatures()" src="images/split-v.gif"></td></tr>
- <tr><td>
- <div style="background-image:url(images/slice-v.gif)" id='advancedw'>
- <table id='advancedi' align='center'>
- <tr><td></td><td width='50' height=5></td><td></td></tr>
- <tr><td>Local Subnet</td><td><input type='text' size='16' id='SUBBLOCK'></td></tr>
- <tr><td>Alternate Local Subnet</td><td><input size='16' type='text' id='ALTSUBBLOCK'></td></tr>
- <tr><td>Netmask</td><td><input type='text' size='16' id='NETMASK'></td></tr>
- <tr><td>DHCP Start unit</td><td><input type='text' size='5' id='DHCPSTARTUNIT'></td></tr>
- <tr><td>DHCP Count</td><td><input type='text' size='5' id='DHCPCOUNT'></td></tr>
- </table>
- </div>
- </td></tr>
- <tr><td>
- <img onClick="togglefeatures()" src="images/adv-v.gif">
- </td>
- </tr>
+ <tr><td valign="top" align="center">
+ <table align="center">
+ <TR> <TD><B>WAN Settings</B></TD>
+ <TD></TD>
+ </TR>
+ <TR> <TD>DHCP</TD>
+ <TD><input type="checkbox" id='DHCP_WAN'></TD>
+ </TR>
+ <TR> <TD>IP</TD>
+ <TD><input type="text" id='IP_WAN' size=14></TD>
+ </TR>
+ <TR> <TD>SUBNET</TD>
+ <TD><input type="text" id='SUBNET_WAN' size=14></TD>
+ </TR>
+ <TR> <TD>NETMASK</TD>
+ <TD><input type="text" id='NETMASK_WAN' size=14></TD>
+ </TR>
+ <TR> <TD>GATEWAY</TD>
+ <TD><input type="text" id='GATEWAY_WAN' size=14></TD>
+ </TR>
+ <TR> <TD>DNS</TD>
+ <TD><input type="text" id='DNS_WAN' size=14></TD>
+ </TR>
+ <TR> <TD><B>LAN Settings</B></TD>
+ <TD></TD>
+ </TR>
+ <TR> <TD>DHCP</TD>
+ <TD><input type="checkbox" id='DHCP_LAN'></TD>
+ </TR>
+ <TR> <TD>IP</TD>
+ <TD><input type="text" id='IP_LAN' size=14></TD>
+ </TR>
+ <TR> <TD>SUBNET</TD>
+ <TD><input type="text" id='SUBNET_LAN' size=14></TD>
+ </TR>
+ <TR> <TD>NETMASK</TD>
+ <TD><input type="text" id='NETMASK_LAN' size=14></TD>
+ </TR>
+ <TR> <TD>GATEWAY</TD>
+ <TD><input type="text" id='GATEWAY_LAN' size=14></TD>
+ </TR>
+ <TR> <TD>DNS</TD>
+ <TD><input type="text" id='DNS_LAN' size=14></TD>
+ </TR>
+ <TR> <TD>ROUTER IP Range</TD>
+ <TD><input type="text" id='ROUTER_IPRANGE' size=14></TD>
+ </TR>
+ <TR> <TD><B>SSH</B></TD>
+ <TD><input type="checkbox" id='SSH_STATUS'></TD>
+ </TR>
+ <TR> <TD colspan=2 align="center">
+ <div id="status"></div>
+ </TD>
+ </TR>
+ <TR> <TD colspan=2 align="center">
+ <input type="button" value="Save" id="save">
+ <input type="button" value="Cancel" id="cancel">
+ </TD>
+ </TR>
</table>
- </div>
+
</td>
- </tr>
- <tr><td align='center' colspan='2'>
- <input type='hidden' id='name'>
- <input style='width:80' type='button' id='save' value='Save'> <input style='width:80' type='button' id='cancel' value='Cancel'>
- <div style='visibility:hidden;overflow:hidden;width:0px;height:0px'>
- <select id='hiddenusers'> </select>
- <select id='hiddennetworking'></select>
- </div>
- </td>
</tr>
</table>
</div>
+<select id="hiddennetworking" style="display:none"></select>
</body>
More information about the asterisk-gui-commits
mailing list