fix some mac accounting stuff

git-svn-id: http://www.observium.org/svn/observer/trunk@1614 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-08-02 17:05:10 +00:00
parent fb3befd29d
commit 9f4725e2e9

View File

@@ -40,7 +40,7 @@
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id'].
"/macaccounting/$stat/top10/1day/$sort/'>
<img style='border: #5e5e5e 2px;' valign=middle src='".$config['base_url']."/graph.php?port=".$interface['interface_id'].
"&stat=$stat&type=mac_acc_total&sort=$sort&from=-1day&to=now&width=150&height=50' />
"&stat=$stat&type=port_mac_acc_total&sort=$sort&from=-1day&to=now&width=150&height=50' />
</a>
</div>
<div style='margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5;'>
@@ -48,42 +48,42 @@
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id'].
"/macaccounting/$stat/top10/2day/$sort/'>
<img style='border: #5e5e5e 2px;' valign=middle src='".$config['base_url']."/graph.php?port=".$interface['interface_id'].
"&stat=$stat&type=mac_acc_total&sort=$sort&from=-2day&to=now&width=150&height=50' />
"&stat=$stat&type=port_mac_acc_total&sort=$sort&from=-2day&to=now&width=150&height=50' />
</a>
</div>
<div style='margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5;'>
<span class=device-head>Week</span><br />
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/$stat/top10/1week/$sort/'>
<img style='border: #5e5e5e 2px;' valign=middle src='".$config['base_url']."/graph.php?port=".$interface['interface_id']."&type=mac_acc_total&sort=$sort&stat=$stat&from=-1week&to=now&width=150&height=50' />
<img style='border: #5e5e5e 2px;' valign=middle src='".$config['base_url']."/graph.php?port=".$interface['interface_id']."&type=port_mac_acc_total&sort=$sort&stat=$stat&from=-1week&to=now&width=150&height=50' />
</a>
</div>
<div style='margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5;'>
<span class=device-head>Month</span><br />
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/$stat/top10/1month/$sort/'>
<img style='border: #5e5e5e 2px;' valign=middle src='".$config['base_url']."/graph.php?port=".$interface['interface_id']."&type=mac_acc_total&sort=$sort&stat=$stat&from=-1month&to=now&width=150&height=50' />
<img style='border: #5e5e5e 2px;' valign=middle src='".$config['base_url']."/graph.php?port=".$interface['interface_id']."&type=port_mac_acc_total&sort=$sort&stat=$stat&from=-1month&to=now&width=150&height=50' />
</a>
</div>
<div style='margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5;'>
<span class=device-head>Year</span><br />
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/$stat/top10/1year/$sort/'>
<img style='border: #5e5e5e 2px;' valign=middle src='".$config['base_url']."/graph.php?port=".$interface['interface_id']."&type=mac_acc_total&sort=$sort&stat=$stat&from=-1year&to=now&width=150&height=50' />
<img style='border: #5e5e5e 2px;' valign=middle src='".$config['base_url']."/graph.php?port=".$interface['interface_id']."&type=port_mac_acc_total&sort=$sort&stat=$stat&from=-1year&to=now&width=150&height=50' />
</a>
</div>
</div>
<div style='float: left;'>
<img src='".$config['base_url']."/graph.php?port=".$interface['interface_id']."&type=mac_acc_total&sort=$sort&stat=$stat&from=$from&to=now&width=745&height=300' />
<img src='".$config['base_url']."/graph.php?port=".$interface['interface_id']."&type=port_mac_acc_total&sort=$sort&stat=$stat&from=$from&to=now&width=745&height=300' />
</div>
<div style=' margin:0px; float: left;';>
<div style='margin: 0px 0px 5px 10px; padding:5px; background: #e5e5e5;'>
<span class=device-head>Traffic</span><br />
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/bits/top10/$period/$sort/'>
<img style='border: #5e5e5e 2px;' valign=middle src='".$config['base_url']."/graph.php?port=".$interface['interface_id']."&stat=bits&type=mac_acc_total&sort=$sort&from=$from&to=now&width=150&height=50' />
<img style='border: #5e5e5e 2px;' valign=middle src='".$config['base_url']."/graph.php?port=".$interface['interface_id']."&stat=bits&type=port_mac_acc_total&sort=$sort&from=$from&to=now&width=150&height=50' />
</a>
</div>
<div style='margin: 0px 0px 5px 10px; padding:5px; background: #e5e5e5;'>
<span class=device-head>Packets</span><br />
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id']."/macaccounting/pkts/top10/$period/$sort/'>
<img style='border: #5e5e5e 2px;' valign=middle src='".$config['base_url']."/graph.php?port=".$interface['interface_id']."&stat=pkts&type=mac_acc_total&sort=$sort&from=$from&to=now&width=150&height=50' />
<img style='border: #5e5e5e 2px;' valign=middle src='".$config['base_url']."/graph.php?port=".$interface['interface_id']."&stat=pkts&type=port_mac_acc_total&sort=$sort&from=$from&to=now&width=150&height=50' />
</a>
</div>
<div style='margin: 0px 0px 5px 10px; padding:5px; background: #e5e5e5;'>
@@ -91,7 +91,7 @@
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id'].
"/macaccounting/$stat/top10/$period/in/'>
<img style='border: #5e5e5e 2px;' valign=middle src='".$config['base_url']."/graph.php?port=".$interface['interface_id'].
"&stat=$stat&type=mac_acc_total&sort=in&from=$from&to=now&width=150&height=50' />
"&stat=$stat&type=port_mac_acc_total&sort=in&from=$from&to=now&width=150&height=50' />
</a>
</div>
<div style='margin: 0px 0px 5px 10px; padding:5px; background: #e5e5e5;'>
@@ -99,7 +99,7 @@
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id'].
"/macaccounting/$stat/top10/$period/out/'>
<img style='border: #5e5e5e 2px;' valign=middle src='".$config['base_url']."/graph.php?port=".$interface['interface_id'].
"&stat=$stat&type=mac_acc_total&sort=out&from=$from&to=now&width=150&height=50' />
"&stat=$stat&type=port_mac_acc_total&sort=out&from=$from&to=now&width=150&height=50' />
</a>
</div>
<div style='margin: 0px 0px 5px 10px; padding:5px; background: #e5e5e5;'>
@@ -107,7 +107,7 @@
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/interface/".$interface['interface_id'].
"/macaccounting/$stat/top10/$period/both/'>
<img style='border: #5e5e5e 2px;' valign=middle src='".$config['base_url']."/graph.php?port=".$interface['interface_id'].
"&stat=$stat&type=mac_acc_total&sort=both&from=$from&to=now&width=150&height=50' />
"&stat=$stat&type=port_mac_acc_total&sort=both&from=$from&to=now&width=150&height=50' />
</a>
</div>
</div>
@@ -138,9 +138,9 @@
}
if($_GET['optc']) {
$graph_type = "mac_acc_" . $_GET['optc'];
$graph_type = "port_mac_acc_" . $_GET['optc'];
} else {
$graph_type = "mac_acc_bits";
$graph_type = "port_mac_acc_bits";
}
if($_GET['optd'] == "thumbs") {