usbmodeswitch: Updated to v.1.2.6 from shibby's branch.
[tomato.git] / release / src / router / www / qos-classnames.asp
blob4cb7fdf600980a1045053b352309cc504cb2df71
1 HTML PUBLIC '-//W3C//DTD HTML 4.0//EN'>
2 <!--
3 Tomato GUI
4 Copyright (C) 2006-2010 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(); %>] Set QOS Class Names</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("qos_classnames"); %>
27 var checker = null;
28 var timer = new TomatoTimer(check);
29 var running = 0;
33 function verifyFields(focused, quiet)
35 return 1;
39 function save()
41 var i, qos, fom;
43 if (!verifyFields(null, false)) return;
45 qos = [];
46 for (i = 1; i < 11; ++i) {
47 qos.push(E('_f_qos_' + (i - 1)).value);
50 fom = E('_fom');
51 fom.qos_classnames.value = qos.join(' ');
52 form.submit(fom, 1);
54 </script>
56 </head>
57 <body>
58 <form id='_fom' method='post' action='tomato.cgi'>
59 <table id='container' cellspacing=0>
60 <tr><td colspan=2 id='header'>
61 <div class='title'>Tomato</div>
62 <div class='version'>Version <% version(); %></div>
63 </td></tr>
64 <tr id='body'><td id='navi'><script type='text/javascript'>navi()</script></td>
65 <td id='content'>
66 <div id='ident'><% ident(); %></div>
68 <!-- / / / -->
70 <input type='hidden' name='_nextpage' value='qos-classnames.asp'>
71 <input type='hidden' name='_service' value='qos-restart'>
72 <input type='hidden' name='qos_classnames' value=''>
75 <div class='section-title'>Set QOS Class Names</div>
76 <div class='section'>
77 <script type='text/javascript'>
78 if ((v = nvram.qos_classnames.match(/^(\w+)\s+(\w+)\s+(\w+)\s+(\w+)\s+(\w+)\s+(\w+)\s+(\w+)\s+(\w+)\s+(\w+)\s+(\w+)$/)) == null) {
79 v = ["-","Highest","High","Medium","Low","Lowest","A","B","C","D","E"];
81 titles = ['-','Class 1', 'Class 2', 'Class 3', 'Class 4', 'Class 5', 'Class 6', 'Class 7', 'Class 8', 'Class 9', 'Class 10'];
82 f = [{ title: ' ', text: '<small>(seconds)</small>' }];
83 for (i = 1; i < 11; ++i) {
84 f.push({ title: titles[i], name: ('f_qos_' + (i - 1)),
85 type: 'text', maxlen: 9, size: 9, value: v[i],
86 suffix: '<span id="count' + i + '"></span>' });
88 createFieldTable('', f);
89 </script>
90 </div>
93 <!-- / / / -->
95 </td></tr>
96 <tr><td id='footer' colspan=2>
97 <span id='footer-msg'></span>
98 <input type='button' value='Save' id='save-button' onclick='save()'>
99 <input type='button' value='Cancel' id='cancel-button' onclick='reloadPage();'>
100 </td></tr>
101 </table>
102 </form>
103 <script type='text/javascript'>verifyFields(null, 1);</script>
104 </body>
105 </html>