Revision 9228de6c
Added by Jim Pingle almost 15 years ago
usr/local/www/graph.php | ||
---|---|---|
61 | 61 |
else |
62 | 62 |
$time_interval = 3; |
63 | 63 |
|
64 |
if ($_GET["initdelay"]) |
|
65 |
$init_delay = $_GET["initdelay"]; //Initial Delay |
|
66 |
else |
|
67 |
$init_delay = 3; |
|
68 |
|
|
64 | 69 |
//SVG attributes |
65 | 70 |
$attribs['axis']='fill="black" stroke="black"'; |
66 | 71 |
$attribs['in']='fill="#FF0000" font-family="Tahoma, Verdana, Arial, Helvetica, sans-serif" font-size="7"'; |
... | ... | |
229 | 234 |
last_ugmt = ugmt; |
230 | 235 |
last_ifin = ifin; |
231 | 236 |
last_ifout = ifout; |
232 |
|
|
237 |
var graphTimerId = 0; |
|
233 | 238 |
switch (plot_in.length) { |
234 | 239 |
case 0: |
235 | 240 |
SVGDoc.getElementById("collect_initial").setAttributeNS(null, 'visibility', 'visible'); |
236 | 241 |
plot_in[0] = diff_ifin / diff_ugmt; |
237 | 242 |
plot_out[0] = diff_ifout / diff_ugmt; |
238 |
setTimeout('fetch_data()',<?=1000*$time_interval?>);
|
|
243 |
setTimeout('fetch_data()',<?=1000*($time_interval + $init_delay)?>);
|
|
239 | 244 |
return; |
240 | 245 |
case 1: |
241 | 246 |
SVGDoc.getElementById("collect_initial").setAttributeNS(null, 'visibility', 'hidden'); |
Also available in: Unified diff
Fix graph staggering, the old method was causing the graphs to diverge in update intervals over time.