1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3 (c) 2005 U.S. Robotics Corporation
9 <link href="usr_main.css" rel="stylesheet" type="text/css">
10 <script src="usr_menus.js" type="text/javascript"></script>
11 <script src="usr_common.js" type="text/javascript"></script>
13 <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
15 <script type="text/javascript" src="util.js"></script>
16 <script type="text/javascript">
18 setPageTitle("<%ejGetWl(wlInterface)%>");
20 var addr = '<%ejGet(logIpAddress)%>';
21 var port = '<%ejGet(logPort)%>';
23 function getLogPort() {
24 var portNum = parseInt(port);
25 if ( isNaN(portNum) || portNum == 0 )
26 portNum = 514; // default system log server port is 514
32 with ( document.forms[0] ) {
33 status[<%ejGet(logStatus)%>].checked = true;
35 levelLog.selectedIndex = <%ejGet(logLevel)%>;
36 levelDisplay.selectedIndex = <%ejGet(logDisplay)%>;
38 logMode.selectedIndex = <%ejGet(logMode)%> - 1;
39 if ( logMode.selectedIndex == 0 ) {
45 logPort.value = getLogPort();
52 var loc = 'logintro.cgi?';
53 var idx, log, display, mode;
55 with ( document.forms[0] ) {
56 if ( status[0].checked == true ) {
57 var msg = 'If disabled, the information captured by the ';
58 msg += 'router will be lost. If you wish to save ';
59 msg += 'the current log information, click the ';
60 msg += '"Cancel" button, view the current system ';
61 msg += 'log, and use the Save option from the File ';
62 msg += 'menu to save the log data.';
63 if ( confirm(msg) == false )
67 if ( status[1].checked == true )
71 idx = levelLog.selectedIndex;
72 log = levelLog.options[idx].value;
73 idx = levelDisplay.selectedIndex;
74 display = levelDisplay.options[idx].value;
75 idx = logMode.selectedIndex;
76 mode = logMode.options[idx].value;
79 valPort = getLogPort();
81 if ( isValidIpAddress(logAddr.value) == false ) {
82 alert('Server IP address "' + logAddr.value + '" is invalid IP address.');
85 if ( isNaN(logPort.value) == true ) {
86 alert('Server UDP port "' + logPort.value + '" is invalid.');
89 valAddr = logAddr.value;
90 valPort = logPort.value;
92 loc += '&logLevel=' + log;
93 loc += '&logDisplay=' + display;
94 loc += '&logMode=' + mode;
95 loc += '&logIpAddress=' + valAddr;
96 loc += '&logPort=' + valPort;
99 var code = 'location.assign("' + loc + '")';
103 function hideInfo(hide) {
104 var status = 'visible';
108 document.forms[0].logAddr.value = '';
109 document.forms[0].logPort.value = '';
111 document.forms[0].logAddr.value = addr;
112 document.forms[0].logPort.value = getLogPort();
115 if (document.getElementById) // DOM3 = IE5, NS6
116 document.getElementById('srvInfo').style.visibility = status;
118 if (document.layers) { // Netscape 4
120 document.forms[0].logAddr.value = '';
121 document.forms[0].logPort.value = '';
124 document.all.srvInfo.style.visibility = status;
128 function cbClick(obj) {
129 var idx = obj.selectedIndex;
130 var val = obj.options[idx].value;
141 <body onload="initMenu('idMenu'); frmLoad();">
143 <script type="text/javascript">
144 writeHeader("System Log", "<%ejGet(curUserName)%>", "<%ejGetOther(sysInfo, adslStd)%>", "<%ejGetOther(sysInfo, noBrPrtcl)%>", <%ejGetOther(sysInfo, pppIpExtension)%>, <%ejGetOther(sysInfo, enblFirewall)%>, <%ejGetOther(sysInfo, enblNat)%>, "<%ejGetWl(wlInterface)%>", <%ejGet(enblQos)%>);
149 <h3>Configuration</h3>
151 <p>This dialog allows you to configure System Log settings. All events greater than
152 or equal to the selected level will be logged or displayed. If the selected mode
153 is <b>Remote</b> or <b>Both</b> events will be sent to the specified
154 UDP port of the specified log server.</p>
156 <p>Select the desired values and press <b>Apply</b> to configure the system log options.</p>
159 <input name='status' id="optStatusDisable" type='radio'> <label for="optStatusDisable">Disable log</label><br/>
160 <input name='status' id="optStatusEnable" type='radio'> <label for="optStatusEnable">Enable log</label>
163 <table border="0" cellpadding="2" cellspacing="0">
165 <td><label for="">Log level:</label></td>
166 <td colspan=2><select name='levelLog' id='levelLog' size=1>
167 <option value=0>Emergency</option>
168 <option value=1>Alert</option>
169 <option value=2>Critical</option>
170 <option value=3>Error</option>
171 <option value=4>Warning</option>
172 <option value=5>Notice</option>
173 <option value=6>Informational</option>
174 <option value=7>Debugging</option>
178 <td><label for="">Display level:</label></td>
179 <td colspan=2><select name='levelDisplay' id='levelDisplay' size=1>
180 <option value=0>Emergency</option>
181 <option value=1>Alert</option>
182 <option value=2>Critical</option>
183 <option value=3>Error</option>
184 <option value=4>Warning</option>
185 <option value=5>Notice</option>
186 <option value=6>Informational</option>
187 <option value=7>Debugging</option>
191 <td><label for="">Mode:</label></td>
192 <td colspan=2><select name='logMode' id='logMode' size=1 onClick='cbClick(this)'>
193 <option value=1>Local</option>
194 <option value=2>Remote</option>
195 <option value=3>Both</option>
201 <td><label for="logAddr">Server IP address:</label></td>
202 <td><input type='text' name='logAddr' id='logAddr'></td>
205 <td><label for="logPort">Server UDP port:</label></td>
206 <td><input type='text' name='logPort' id='logPort'></td>
211 <p><input type='button' onClick='btnApply()' value='Apply'></p>
214 <script type="text/javascript">