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>
36 <script type='text/javascript' src='wireless.jsx?_http_id=<%
nv(http_id
); %>'
></script>
37 <script type='text/javascript' src='bwm-common.js'
></script>
39 <script type='text/javascript'
>
40 // <% nvram("wan_ifname,lan_ifname,wl_ifname,wan_proto,wan_iface,web_svg,rstats_colors"); %>
44 var updateDiv
= updateInt
;
46 var updateReTotal
= 1;
54 var ref
= new TomatoRefresh('update.cgi', 'exec=netdev', 2);
56 ref
.stop = function() {
57 this.timer
.start(1000);
60 ref
.refresh = function(text
) {
70 n
= (new Date()).getTime();
71 if (this.timeExpect
) {
72 if (debugTime
) E('dtime').innerHTML
= (this.timeExpect
- n
) + ' ' + ((this.timeExpect
+ 2000) - n
);
73 this.timeExpect
+= 2000;
74 this.refreshTime
= MAX(this.timeExpect
- n
, 500);
77 this.timeExpect
= n
+ 2000;
82 if ((p
= prev
[i
]) != null) {
86 h
.rx
.push((c
.rx
< p
.rx
) ? (c
.rx
+ (0xFFFFFFFF - p
.rx
)) : (c
.rx
- p
.rx
));
89 h
.tx
.push((c
.tx
< p
.tx
) ? (c
.tx
+ (0xFFFFFFFF - p
.tx
)) : (c
.tx
- p
.tx
));
91 else if (!speed_history
[i
]) {
92 speed_history
[i
] = {};
96 for (j
= 300; j
> 0; --j
) {
115 wdogWarn
.style
.display
= '';
118 function watchdogReset()
120 if (wdog
) clearTimeout(wdog
)
121 wdog
= setTimeout(watchdog
, 10000);
122 wdogWarn
.style
.display
= 'none';
131 wdogWarn
= E('warnwd');
139 <body onload='init()'
>
140 <form id='_fom' method='post' action='tomato.cgi'
>
141 <table id='container' cellspacing=
0>
142 <tr><td colspan=
2 id='header'
>
143 <div class='title'
>Tomato
</div>
144 <div class='version'
>Version <%
version(); %></div>
146 <tr id='body'
><td id='navi'
><script type='text/javascript'
>navi()</script></td>
148 <div id='ident'
><%
ident(); %></div>
153 <div id='tab-area'
></div>
155 <script type='text/javascript'
>
156 if (nvram
.web_svg
!= '0') {
157 // without a div, Opera 9 moves svgdoc several pixels outside of <embed> (?)
158 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>");
162 <div id='bwm-controls'
>
163 <small>(
10 minute window,
2 second interval)
</small><br>
166 <a href='javascript:switchAvg(
1)' id='avg1'
>Off
</a>,
167 <a href='javascript:switchAvg(
2)' id='avg2'
>2x
</a>,
168 <a href='javascript:switchAvg(
4)' id='avg4'
>4x
</a>,
169 <a href='javascript:switchAvg(
6)' id='avg6'
>6x
</a>,
170 <a href='javascript:switchAvg(
8)' id='avg8'
>8x
</a><br>
172 <a href='javascript:switchScale(
0)' id='scale0'
>Uniform
</a>,
173 <a href='javascript:switchScale(
1)' id='scale1'
>Per IF
</a><br>
175 <a href='javascript:switchDraw(
0)' id='draw0'
>Solid
</a>,
176 <a href='javascript:switchDraw(
1)' id='draw1'
>Line
</a><br>
177 Color:
<a href='javascript:switchColor()' id='drawcolor'
>-
</a><br>
178 <small><a href='javascript:switchColor(
1)' id='drawrev'
>[reverse]
</a></small><br>
181 » <a href=
"admin-bwm.asp">Configure
</a>
185 <table border=
0 cellspacing=
2 id='txt'
>
187 <td width='
8%' align='right' valign='top'
><b style='border-bottom:blue
1px solid' id='rx-name'
>RX
</b></td>
188 <td width='
15%' align='right' valign='top'
><span id='rx-current'
></span></td>
189 <td width='
8%' align='right' valign='top'
><b>Avg
</b></td>
190 <td width='
15%' align='right' valign='top' id='rx-avg'
></td>
191 <td width='
8%' align='right' valign='top'
><b>Peak
</b></td>
192 <td width='
15%' align='right' valign='top' id='rx-max'
></td>
193 <td width='
8%' align='right' valign='top'
><b>Total
</b></td>
194 <td width='
14%' align='right' valign='top' id='rx-total'
></td>
198 <td width='
8%' align='right' valign='top'
><b style='border-bottom:blue
1px solid' id='tx-name'
>TX
</b></td>
199 <td width='
15%' align='right' valign='top'
><span id='tx-current'
></span></td>
200 <td width='
8%' align='right' valign='top'
><b>Avg
</b></td>
201 <td width='
15%' align='right' valign='top' id='tx-avg'
></td>
202 <td width='
8%' align='right' valign='top'
><b>Peak
</b></td>
203 <td width='
15%' align='right' valign='top' id='tx-max'
></td>
204 <td width='
8%' align='right' valign='top'
><b>Total
</b></td>
205 <td width='
14%' align='right' valign='top' id='tx-total'
></td>
216 <tr><td id='footer' colspan=
2>
217 <span id='warnwd' style='display:none'
>Warning:
10 second session timeout, restarting...
</span>
218 <span id='dtime'
></span>
219 <img src='spin.gif' id='refresh-spinner' onclick='javascript:debugTime=
1'
>