device subpages cleanup, remove dead code

git-svn-id: http://www.observium.org/svn/observer/trunk@1896 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-03-16 23:10:10 +00:00
parent b3dc4c3129
commit 1a477eebbe
57 changed files with 1072 additions and 1061 deletions
+8 -6
View File
@@ -1,6 +1,7 @@
<?php
if($ports['total']) {
if ($ports['total'])
{
echo('<div style="background-color: #eeeeee; margin: 5px; padding: 5px;">');
# ' . device_traffic_image($device['device_id'], 490, 100, $day, '-300s'));
@@ -13,7 +14,6 @@ if($ports['total']) {
$graph_array['legend'] = "no";
$graph = generate_graph_tag($graph_array);
$content = "<div class=list-large>".$device['hostname']." - Device Traffic</div>";
$content .= "<div style=\'width: 850px\'>";
$graph_array['legend'] = "yes";
@@ -30,10 +30,8 @@ if($ports['total']) {
$link = $config['base_url'] . "/graphs/" . $graph_array['id'] . "/" . $graph_array['type'] . "/" . $day . "/" . $config['now'] . "/";
echo(overlib_link($link, $graph, $content, NULL));
echo(' <div style="height: 5px;"></div>');
echo(' <table class="tablehead" cellpadding="2" cellspacing="0" width="100%">
@@ -50,14 +48,18 @@ if($ports['total']) {
$sql = "SELECT * FROM ports WHERE `device_id` = '" . $device['device_id'] . "' AND deleted != '1'";
$query = mysql_query($sql);
$ifsep = "";
while($data = mysql_fetch_array($query)) {
while ($data = mysql_fetch_array($query))
{
$data = ifNameDescr($data);
$data = array_merge($data, $device);
echo("$ifsep" . generate_port_link($data, makeshortif(strtolower($data['label']))));
$ifsep = ", ";
}
unset($ifsep);
echo(" </div>");
echo("</div>");
}
?>
?>