www.usr.com/support/gpl/USR9113_release1.0.tar.gz
[bcm963xx.git] / userapps / broadcom / cfm / html / portmapadd.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <!--
3         (c) 2005 U.S. Robotics Corporation
4 -->
5 <html>
6 <head>
7         <title>Add Port Mapping Group</title>
8
9         <link href="usr_layout.css" type="text/css" rel="stylesheet" /><script src="usr_layout.js" type="text/javascript"></script>
10         <link href="usr_menus_dropdown.css" rel="stylesheet" type="text/css"><script src="usr_menus_dropdown.js" type="text/javascript"></script><script src="usr_menus_build.js" type="text/javascript"></script>
11         <link href="usr_device.css" type="text/css" rel="stylesheet" /><script src="usr_device.js" type="text/javascript"></script><link href="usr_91xx.css" type="text/css" rel="stylesheet" /><script src="usr_91xx.js" type="text/javascript"></script><script src="usr_resources.js" type="text/javascript"></script>
12
13         <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
14
15         <script type="text/javascript" src="portName.js"></script>
16         <script type="text/javascript">
17 <!-- hide
18
19
20 function btnRemove() {
21    with ( document.choiceForm ) {
22       var arrSelected = new Array();
23       var count = 0;
24       for ( i = 0; i < lstChoice.options.length; i++ ) {
25          if ( lstChoice.options[i].selected == true ) {
26             arrSelected[count] = lstChoice.options[i].value;
27          }
28          count++;
29       }
30       var x = 0;
31       for (i = 0; i < lstChoice.options.length; i++) {
32          for (x = 0; x < arrSelected.length; x++) {
33             if (lstChoice.options[i].value == arrSelected[x]) {
34                varOpt = new Option(lstChoice.options[i].text, lstChoice.options[i].value);
35                lstAvailable.options[lstAvailable.length] = varOpt;
36                lstChoice.options[i] = null;
37             }
38          }
39       }
40    }
41 }
42
43 function btnAdd() {
44    with ( document.choiceForm ) {
45       var arrSelected = new Array();
46       var count = 0;
47       for ( i = 0; i < lstAvailable.options.length; i++ ) {
48          if ( lstAvailable.options[i].selected == true ) {
49             arrSelected[count] = lstAvailable.options[i].value;
50          }
51          count++;
52       }
53       var x = 0;
54       for (i = 0; i < lstAvailable.options.length; i++) {
55          for (x = 0; x < arrSelected.length; x++) {
56             if (lstAvailable.options[i].value == arrSelected[x]) {
57                varOpt = new Option(lstAvailable.options[i].text, lstAvailable.options[i].value);
58                lstChoice.options[lstChoice.length] = varOpt;
59                lstAvailable.options[i] = null;
60             }
61          }
62       }
63    }
64 }
65
66 function btnApply() {
67    var loc = 'portmapcfg.cmd?action=add';
68    with ( document.forms[0] ) {
69       var i = 0;
70
71       if (groupName.value == '') {
72          alert('Need to provide a valid Group Name "A non empty string of characters."');
73          return;
74       }
75       if (lstChoice.length == 0) {
76          alert('Need to provide at least one interface "Select one from the Available list."');
77          return;
78       }
79       loc += '&groupName=' + groupName.value;
80       var ifc = '';
81       var tempList = '';
82       for (i = 0; i < lstChoice.length; i++) {
83          tempList += lstChoice.options[i].value + '|';
84       }
85       var interfaces = tempList.split('|');
86       interfaces.sort();
87       for (i = 0; i < interfaces.length; i++ ) {
88          ifc += interfaces[i] + '|';
89       }
90       loc += '&choiceBox=' + ifc;
91       if (vendorid0.value != '')
92          loc += '&vendorid0=' + vendorid0.value;
93       if (vendorid1.value != '')
94          loc += '&vendorid1=' + vendorid1.value;
95       if (vendorid2.value != '')
96          loc += '&vendorid2=' + vendorid2.value;
97       if (vendorid3.value != '')
98          loc += '&vendorid3=' + vendorid3.value;
99       if (vendorid4.value != '')
100          loc += '&vendorid4=' + vendorid4.value;
101    }
102    var code = 'location="' + loc + '"';
103    eval(code);
104 }
105
106         // done hiding -->
107         </script>
108 </head>
109 <body onload="initMenu();">
110
111 <script type="text/javascript">
112         writeHeader("Add Port Mapping Group");
113 </script>
114
115 <form name="choiceForm">
116
117    <p>To create a new mapping group:</p>
118
119    <ol>
120         <li>Enter the group name and select interfaces from the
121            <b>Available interfaces</b> list and add them to the <b>Grouped interfaces</b> list
122            using the arrow buttons to create the required mapping of the ports.
123            The group name must be unique.</li>
124
125         <li>Press <b>Save</b> button to make the changes effective.</li>
126    </ol>
127
128    <p><b>Note:</b> The selected interfaces will be removed from their
129    existing groups and added to the new group.</p>
130
131    <p><b>Note:</b> If a vendor ID is configured for a specific client device,
132    please REBOOT the client device attached to the modem to allow it to
133    obtain an appropriate IP address.</p>
134
135 <p><label for="groupName">Group name:</label> <input type="text" name="groupName" id="groupName" size="30" maxlength="32"></p>
136
137    <table border="0" cellpadding="0" cellspacing="0">
138       <tr>
139          <td><label for="">Available interfaces:</label></td>
140          <td></td>
141          <td><label for="">Grouped interfaces:</label></td>
142       </tr>
143       <tr>
144          <td>
145              <select multiple name="lstAvailable" id="lstAvailable" size="10">
146 <script type="text/javascript">
147 <!-- hide
148 {
149    var i = 0;
150    var dispName = '';
151    var brdId = '<%ejGetJS(boardID)%>';
152    var interfaceInfo = '<%ejGetOther(bridgeInterfaceInfo, all)%>';
153    var interfaces = interfaceInfo.split('|');
154    interfaces.sort();
155    for ( i = 0; i < interfaces.length; i++ ) {
156       if (interfaces[i] != '') {
157          document.write("  <option value='" + interfaces[i] + "'>");
158       }
159       dispName = getUNameByLName(brdId + '|' + interfaces[i]);
160       document.writeln(dispName);
161    }
162 }
163 // done hiding -->
164                   </script>
165                </select>
166            </td>
167       <td>
168          <table border="0" cellpadding="0" cellspacing="5">
169             <tr>
170                 <td><input type="button" value=" -> " onClick="btnAdd()"></td>
171             </tr>
172             <tr>
173                 <td><input type="button" value=" <- " onClick="btnRemove()"></td>
174             </tr>
175          </table>
176       </td>
177       <td>
178           <select multiple name="lstChoice" id="lstChoice" size="10"></select>
179       </td>
180         </table>
181         <h4>Automatically add clients with the following DHCP vendor IDs:</h4>
182    <table>
183       <tr>
184          <td><input type='text' name='vendorid0' size="32" maxlength="64"></td>
185       </tr>
186       <tr>
187          <td><input type='text' name='vendorid1' size="32" maxlength="64"></td>
188       </tr>
189       <tr>
190          <td><input type='text' name='vendorid2' size="32" maxlength="64"></td>
191       </tr>
192       <tr>
193          <td><input type='text' name='vendorid3' size="32" maxlength="64"></td>
194       </tr>
195       <tr>
196          <td><input type='text' name='vendorid4' size="32" maxlength="64"></td>
197       </tr>
198    </table>
199
200         <p><input type='button' onClick='btnApply()' value="Save"></p>
201 </form>
202
203 <script type="text/javascript">
204         writeFooter();
205 </script>
206
207 </body>
208 </html>