9 |
9 |
$height = "150";
|
10 |
10 |
$showngraphlist = explode(",", $pconfig['traffic_graphs-config']);
|
11 |
11 |
$graphcounter = 0;
|
|
12 |
if($config['widgets']['traffic_graphs-config']){
|
|
13 |
$graphlistcount = count($showngraphlist);
|
|
14 |
$refreshintervalstring = $showngraphlist[$graphlistcount-1];
|
|
15 |
$eqposition = strpos($refreshintervalstring,"=");
|
|
16 |
$refreshInterval = substr($refreshintervalstring, $eqposition+1);
|
|
17 |
}
|
|
18 |
else {
|
|
19 |
$refreshInterval = "3";
|
|
20 |
}
|
12 |
21 |
|
|
22 |
?>
|
|
23 |
|
|
24 |
<div id="traffic_graphs-settings" name="traffic_graphs-settings" class="widgetconfigdiv" style="display:none;">
|
|
25 |
Refresh Interval:
|
|
26 |
<select name="refreshInterval" class="formfld" id="refreshInterval" onchange="updateGraphDisplays();">
|
|
27 |
<option value="1" <?php if ($refreshInterval == "1") echo "SELECTED";?>>1</option>
|
|
28 |
<option value="2" <?php if ($refreshInterval == "2") echo "SELECTED";?>>2</option>
|
|
29 |
<option value="3" <?php if ($refreshInterval == "3") echo "SELECTED";?>>3</option>
|
|
30 |
<option value="4" <?php if ($refreshInterval == "4") echo "SELECTED";?>>4</option>
|
|
31 |
<option value="5" <?php if ($refreshInterval == "5") echo "SELECTED";?>>5</option>
|
|
32 |
</select> Seconds<br> <b>Note:</b> changing this settings can affect CPU Performance on the pfSense Box<br><br>
|
|
33 |
<input id="submit" name="submit" type="submit" onclick="return updatePref();" class="formbtn" value="Save Settings" />
|
|
34 |
</div>
|
|
35 |
|
|
36 |
<script language="javascript" type="text/javascript">
|
|
37 |
d = document;
|
|
38 |
selectIntLink = "traffic_graphs-configure";
|
|
39 |
textlink = d.getElementById(selectIntLink);
|
|
40 |
textlink.style.display = "inline";
|
|
41 |
</script>
|
|
42 |
|
|
43 |
<?php
|
|
44 |
|
13 |
45 |
if (get_cpu_speed() >= 500)
|
14 |
46 |
$firstgraphshown = false;
|
15 |
47 |
else
|
... | ... | |
68 |
100 |
<div style="clear:both;"></div>
|
69 |
101 |
</div>
|
70 |
102 |
<div id="<?=$ifname;?>graphdiv" style="display:<?php echo $graphdisplay;?>">
|
71 |
|
<embed id="graph" src="graph.php?ifnum=<?=$ifnum;?>&ifname=<?=rawurlencode($ifname);?>" type="image/svg+xml" width="<? echo $width; ?>" height="<? echo $height; ?>" pluginspage="http://www.adobe.com/svg/viewer/install/auto" />
|
|
103 |
<embed id="graph" src="graph.php?ifnum=<?=$ifnum;?>&ifname=<?=rawurlencode($ifname);?>&timeint=<?=$refreshInterval;?>" type="image/svg+xml" width="<? echo $width; ?>" height="<? echo $height; ?>" pluginspage="http://www.adobe.com/svg/viewer/install/auto" />
|
72 |
104 |
</div>
|
73 |
105 |
<? $firstgraphshown = true; $graphcounter++;} ?>
|
74 |
106 |
</div>
|
allow user to configure refresh interval. Default is 3 seconds