Merge branch 'tomato-ND-usbmod-base' into tomato-K26-usbmod-base
[tomato.git] / release / src / router / www / admin-debug.asp
blobc5f91a2998e74cecac3e10bef0d7ad0b18677846
1 <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0//EN'>
2 <!--
3 Tomato GUI
4 Copyright (C) 2006-2009 Jonathan Zarate
5 http://www.polarcloud.com/tomato/
7 For use with Tomato Firmware only.
8 No part of this file may be used without permission.
9 -->
10 <html>
11 <head>
12 <meta http-equiv='content-type' content='text/html;charset=utf-8'>
13 <meta name='robots' content='noindex,nofollow'>
14 <title>[<% ident(); %>] Admin: Debugging</title>
15 <link rel='stylesheet' type='text/css' href='tomato.css'>
16 <link rel='stylesheet' type='text/css' href='color.css'>
17 <script type='text/javascript' src='tomato.js'></script>
19 <!-- / / / -->
21 <script type='text/javascript' src='debug.js'></script>
23 <script type='text/javascript'>
25 // <% nvram("debug_nocommit,debug_cprintf,debug_cprintf_file,console_loglevel,t_cafree,t_hidelr,debug_ddns,debug_norestart"); %>
27 function nvramCommit()
29 fields.disableAll('_fom', 1);
30 form.submitHidden('nvcommit.cgi', { '_nextpage': myName() });
33 function verifyFields(focused, quiet)
35 return 1;
38 function save()
40 var fom = E('_fom');
41 fom.debug_nocommit.value = fom.f_debug_nocommit.checked ? 1 : 0;
42 fom.debug_cprintf.value = fom.f_debug_cprintf.checked ? 1 : 0;
43 fom.debug_cprintf_file.value = fom.f_debug_cprintf_file.checked ? 1 : 0;
44 fom.t_cafree.value = fom.f_cafree.checked ? 1 : 0;
45 fom.t_hidelr.value = fom.f_hidelr.checked ? 1 : 0;
46 fom.debug_ddns.value = fom.f_debug_ddns.checked ? 1 : 0;
48 var a = [];
49 if (fom.f_nr_crond.checked) a.push('crond');
50 if (fom.f_nr_dnsmasq.checked) a.push('dnsmasq');
51 /* LINUX26-BEGIN */
52 if (fom.f_nr_hotplug2.checked) a.push('hotplug2');
53 /* LINUX26-END */
54 if (fom.f_nr_igmprt.checked) a.push('igmprt');
55 fom.debug_norestart.value = a.join(',');
57 form.submit(fom, 1);
59 </script>
61 </head>
62 <body>
63 <form id='_fom' method='post' action='tomato.cgi'>
64 <table id='container' cellspacing=0>
65 <tr><td colspan=2 id='header'>
66 <div class='title'>Tomato</div>
67 <div class='version'>Version <% version(); %></div>
68 </td></tr>
69 <tr id='body'><td id='navi'><script type='text/javascript'>navi()</script></td>
70 <td id='content'>
71 <div id='ident'><% ident(); %></div>
73 <!-- / / / -->
75 <input type='hidden' name='_nextpage' value='admin-misc.asp'>
77 <input type='hidden' name='debug_nocommit'>
78 <input type='hidden' name='debug_cprintf'>
79 <input type='hidden' name='debug_cprintf_file'>
80 <input type='hidden' name='debug_ddns'>
81 <input type='hidden' name='debug_norestart'>
82 <input type='hidden' name='t_cafree'>
83 <input type='hidden' name='t_hidelr'>
85 <div class='section-title'>Debugging</div>
86 <div class='section'>
87 <script type='text/javascript'>
88 a = [];
89 for (i = 1; i <= 8; ++i) a.push([i, i]);
90 createFieldTable('', [
91 { title: 'Avoid performing an NVRAM commit', name: 'f_debug_nocommit', type: 'checkbox', value: nvram.debug_nocommit != '0' },
92 { title: 'Enable cprintf output to console', name: 'f_debug_cprintf', type: 'checkbox', value: nvram.debug_cprintf != '0' },
93 { title: 'Enable cprintf output to /tmp/cprintf', name: 'f_debug_cprintf_file', type: 'checkbox', value: nvram.debug_cprintf_file != '0' },
94 { title: 'Enable DDNS output to /tmp/mdu-*', name: 'f_debug_ddns', type: 'checkbox', value: nvram.debug_ddns != '0' },
95 { title: 'Count cache memory and buffers as free memory', name: 'f_cafree', type: 'checkbox', value: nvram.t_cafree == '1' },
96 { title: 'Avoid displaying LAN to router connections', name: 'f_hidelr', type: 'checkbox', value: nvram.t_hidelr == '1' },
97 { title: 'Console log level', name: 'console_loglevel', type: 'select', options: a, value: fixInt(nvram.console_loglevel, 1, 8, 1) },
98 { title: 'Do not restart the following process if they die', multi: [
99 { name: 'f_nr_crond', type: 'checkbox', suffix: ' crond<br>', value: (nvram.debug_norestart.indexOf('crond') != -1) },
100 { name: 'f_nr_dnsmasq', type: 'checkbox', suffix: ' dnsmasq<br>', value: (nvram.debug_norestart.indexOf('dnsmasq') != -1) },
101 /* LINUX26-BEGIN */
102 { name: 'f_nr_hotplug2', type: 'checkbox', suffix: ' hotplug2<br>', value: (nvram.debug_norestart.indexOf('hotplug2') != -1) },
103 /* LINUX26-END */
104 { name: 'f_nr_igmprt', type: 'checkbox', suffix: ' igmprt<br>', value: (nvram.debug_norestart.indexOf('igmprt') != -1) }
107 </script>
108 <br><br>
110 &raquo; <a href='clearcookies.asp?_http_id=<% nv(http_id); %>'>Clear Cookies</a><br>
111 &raquo; <a href='javascript:nvramCommit()'>NVRAM Commit</a><br>
112 &raquo; <a href='javascript:reboot()'>Reboot</a><br>
113 &raquo; <a href='javascript:shutdown()'>Shutdown</a><br>
114 <br><br>
116 &raquo; <a href='/cfe/cfe.bin?_http_id=<% nv(http_id); %>'>Download CFE</a><br>
117 &raquo; <a href='/ipt/iptables.txt?_http_id=<% nv(http_id); %>'>Download Iptables Dump</a><br>
118 &raquo; <a href='/logs/syslog.txt?_http_id=<% nv(http_id); %>'>Download Logs</a><br>
119 &raquo; <a href='/nvram/nvram.txt?_http_id=<% nv(http_id); %>'>Download NVRAM Dump</a><br>
120 <br>
122 <div style='width:80%'>
123 <b>Warning</b>: The NVRAM Dump text file may contain information like wireless
124 encryption keys and usernames/passwords for the router, ISP and DDNS. Please
125 review &amp; edit this file before sharing it with
126 anyone.<br>
127 </div>
129 </div>
131 <!-- / / / -->
133 </td></tr>
134 <tr><td id='footer' colspan=2>
135 <span id='footer-msg'></span>
136 <input type='button' value='Save' id='save-button' onclick='save()'>
137 <input type='button' value='Cancel' id='cancel-button' onclick='reloadPage();'>
138 </td></tr>
139 </table>
140 </form>
141 </body>
142 </html>