1 <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML
4.0//EN'
>
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.
12 <meta http-equiv='content-type' content='text/html;charset=utf-
8'
>
13 <meta name='robots' content='noindex,nofollow'
>
14 <title>[<%
ident(); %>] Bandwidth: Real-Time
</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>
21 <style type='text/css'
>
35 <script type='text/javascript' src='debug.js'
></script>
37 <script type='text/javascript' src='wireless.jsx?_http_id=<%
nv(http_id
); %>'
></script>
38 <script type='text/javascript' src='bwm-common.js'
></script>
40 <script type='text/javascript'
>
41 // <% nvram("wan_ifname,lan_ifname,wl_ifname,wan_proto,wan_iface,web_svg,rstats_colors"); %>
45 var updateDiv
= updateInt
;
47 var updateReTotal
= 1;
55 var ref
= new TomatoRefresh('update.cgi', 'exec=netdev', 2);
57 ref
.stop = function() {
58 this.timer
.start(1000);
61 ref
.refresh = function(text
) {
71 n
= (new Date()).getTime();
72 if (this.timeExpect
) {
73 if (debugTime
) E('dtime').innerHTML
= (this.timeExpect
- n
) + ' ' + ((this.timeExpect
+ 2000) - n
);
74 this.timeExpect
+= 2000;
75 this.refreshTime
= MAX(this.timeExpect
- n
, 500);
78 this.timeExpect
= n
+ 2000;
83 if ((p
= prev
[i
]) != null) {
87 h
.rx
.push((c
.rx
< p
.rx
) ? (c
.rx
+ (0xFFFFFFFF - p
.rx
)) : (c
.rx
- p
.rx
));
90 h
.tx
.push((c
.tx
< p
.tx
) ? (c
.tx
+ (0xFFFFFFFF - p
.tx
)) : (c
.tx
- p
.tx
));
92 else if (!speed_history
[i
]) {
93 speed_history
[i
] = {};
97 for (j
= 300; j
> 0; --j
) {
116 wdogWarn
.style
.display
= '';
119 function watchdogReset()
121 if (wdog
) clearTimeout(wdog
)
122 wdog
= setTimeout(watchdog
, 10000);
123 wdogWarn
.style
.display
= 'none';
132 wdogWarn
= E('warnwd');
140 <body onload='init()'
>
142 <table id='container' cellspacing=
0>
143 <tr><td colspan=
2 id='header'
>
144 <div class='title'
>Tomato
</div>
145 <div class='version'
>Version <%
version(); %></div>
147 <tr id='body'
><td id='navi'
><script type='text/javascript'
>navi()</script></td>
149 <div id='ident'
><%
ident(); %></div>
154 <div id='tab-area'
></div>
156 <script type='text/javascript'
>
157 if (nvram
.web_svg
!= '0') {
158 // without a div, Opera 9 moves svgdoc several pixels outside of <embed> (?)
159 W("<div style='border-top:1px solid #f0f0f0;border-bottom:1px solid #f0f0f0;visibility:hidden;padding:0;margin:0' id='graph'><embed src='bwm-graph.svg?<% version(); %>' style='width:760px;height:300px;margin:0;padding:0' type='image/svg+xml' pluginspage='http://www.adobe.com/svg/viewer/install/'></embed></div>");
163 <div id='bwm-controls'
>
164 <small>(
10 minute window,
2 second interval)
</small><br>
167 <a href='javascript:switchAvg(
1)' id='avg1'
>Off
</a>,
168 <a href='javascript:switchAvg(
2)' id='avg2'
>2x
</a>,
169 <a href='javascript:switchAvg(
4)' id='avg4'
>4x
</a>,
170 <a href='javascript:switchAvg(
6)' id='avg6'
>6x
</a>,
171 <a href='javascript:switchAvg(
8)' id='avg8'
>8x
</a><br>
173 <a href='javascript:switchScale(
0)' id='scale0'
>Uniform
</a>,
174 <a href='javascript:switchScale(
1)' id='scale1'
>Per IF
</a><br>
176 <a href='javascript:switchDraw(
0)' id='draw0'
>Solid
</a>,
177 <a href='javascript:switchDraw(
1)' id='draw1'
>Line
</a><br>
178 Color:
<a href='javascript:switchColor()' id='drawcolor'
>-
</a><br>
179 <small><a href='javascript:switchColor(
1)' id='drawrev'
>[reverse]
</a></small><br>
182 » <a href=
"admin-bwm.asp">Configure
</a>
186 <table border=
0 cellspacing=
2 id='txt'
>
188 <td width='
8%' align='right' valign='top'
><b style='border-bottom:blue
1px solid' id='rx-name'
>RX
</b></td>
189 <td width='
15%' align='right' valign='top'
><span id='rx-current'
></span></td>
190 <td width='
8%' align='right' valign='top'
><b>Avg
</b></td>
191 <td width='
15%' align='right' valign='top' id='rx-avg'
></td>
192 <td width='
8%' align='right' valign='top'
><b>Peak
</b></td>
193 <td width='
15%' align='right' valign='top' id='rx-max'
></td>
194 <td width='
8%' align='right' valign='top'
><b>Total
</b></td>
195 <td width='
14%' align='right' valign='top' id='rx-total'
></td>
199 <td width='
8%' align='right' valign='top'
><b style='border-bottom:blue
1px solid' id='tx-name'
>TX
</b></td>
200 <td width='
15%' align='right' valign='top'
><span id='tx-current'
></span></td>
201 <td width='
8%' align='right' valign='top'
><b>Avg
</b></td>
202 <td width='
15%' align='right' valign='top' id='tx-avg'
></td>
203 <td width='
8%' align='right' valign='top'
><b>Peak
</b></td>
204 <td width='
15%' align='right' valign='top' id='tx-max'
></td>
205 <td width='
8%' align='right' valign='top'
><b>Total
</b></td>
206 <td width='
14%' align='right' valign='top' id='tx-total'
></td>
217 <tr><td id='footer' colspan=
2>
218 <span id='warnwd' style='display:none'
>Warning:
10 second timeout, restarting...
</span>
219 <span id='dtime'
></span>
220 <img src='spin.gif' id='refresh-spinner' onclick='javascript:debugTime=
1'
>