move from port_id to interface_id. make ports discovery only discover. add some cleaner functions. add a tiny bit of alerting infrastructure.

git-svn-id: http://www.observium.org/svn/observer/trunk@3195 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2012-05-16 13:25:50 +00:00
parent 2e2379a8a1
commit 4db1454e92
100 changed files with 525 additions and 928 deletions

View File

@@ -6,17 +6,17 @@ global $config;
if (!$graph_type) { $graph_type = "pagp_bits"; }
$daily_traffic = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=".$config['time']['day']."&to=".$config['time']['now']."&width=215&height=100";
$daily_url = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=".$config['time']['day']."&to=".$config['time']['now']."&width=500&height=150";
$daily_traffic = "graph.php?port=" . $port['port_id'] . "&type=$graph_type&from=".$config['time']['day']."&to=".$config['time']['now']."&width=215&height=100";
$daily_url = "graph.php?port=" . $port['port_id'] . "&type=$graph_type&from=".$config['time']['day']."&to=".$config['time']['now']."&width=500&height=150";
$weekly_traffic = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=".$config['time']['week']."&to=".$config['time']['now']."&width=215&height=100";
$weekly_url = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=".$config['time']['week']."&to=".$config['time']['now']."&width=500&height=150";
$weekly_traffic = "graph.php?port=" . $port['port_id'] . "&type=$graph_type&from=".$config['time']['week']."&to=".$config['time']['now']."&width=215&height=100";
$weekly_url = "graph.php?port=" . $port['port_id'] . "&type=$graph_type&from=".$config['time']['week']."&to=".$config['time']['now']."&width=500&height=150";
$monthly_traffic = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=".$config['time']['month']."&to=".$config['time']['now']."&width=215&height=100";
$monthly_url = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=".$config['time']['month']."&to=".$config['time']['now']."&width=500&height=150";
$monthly_traffic = "graph.php?port=" . $port['port_id'] . "&type=$graph_type&from=".$config['time']['month']."&to=".$config['time']['now']."&width=215&height=100";
$monthly_url = "graph.php?port=" . $port['port_id'] . "&type=$graph_type&from=".$config['time']['month']."&to=".$config['time']['now']."&width=500&height=150";
$yearly_traffic = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=".$config['time']['yearh']."&to=".$config['time']['now']."&width=215&height=100";
$yearly_url = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=".$config['time']['yearh']."&to=".$config['time']['now']."&width=500&height=150";
$yearly_traffic = "graph.php?port=" . $port['port_id'] . "&type=$graph_type&from=".$config['time']['yearh']."&to=".$config['time']['now']."&width=215&height=100";
$yearly_url = "graph.php?port=" . $port['port_id'] . "&type=$graph_type&from=".$config['time']['yearh']."&to=".$config['time']['now']."&width=500&height=150";
echo("<a href='#' onmouseover=\"return overlib('<img src=\'$daily_url\'>', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">
<img src='$daily_traffic' border=0></a> ");