mirror of
https://github.com/librenms/librenms.git
synced 2024-09-23 03:18:54 +00:00
fix up device/vrfs page
git-svn-id: http://www.observium.org/svn/observer/trunk@2049 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
parent
d77765262a
commit
5ab12a5641
@ -21,7 +21,8 @@ if (is_file($rrd_filename))
|
||||
$rrd_list[$i]['rra'] = $oid_rra;
|
||||
$i++;
|
||||
}
|
||||
} else { echo("file missing: $file"); }
|
||||
}
|
||||
#} else { echo("file missing: $file"); }
|
||||
|
||||
$colours = "mixed";
|
||||
$nototal = 1;
|
||||
@ -29,4 +30,4 @@ $unit_text = "Errors";
|
||||
|
||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -12,17 +12,17 @@ echo('<td class="list-bold">');
|
||||
$ports_query = mysql_query("SELECT * FROM ports WHERE `device_id` = '" . $device['device_id'] . "' AND `ifVrf` = '" . $vrf['vrf_id'] . "' ");
|
||||
while ($port = mysql_fetch_assoc($ports_query))
|
||||
{
|
||||
if ($_GET['opta'])
|
||||
if ($_GET['opta'] == "graphs")
|
||||
{
|
||||
$graph_type = "port_" . $_GET['opta'];
|
||||
$graph_type = "port_" . $_GET['optb'];
|
||||
echo("<div style='display: block; padding: 2px; margin: 2px; min-width: 139px; max-width:139px; min-height:85px; max-height:85px; text-align: center; float: left; background-color: #e9e9e9;'>
|
||||
<div style='font-weight: bold;'>".makeshortif($port['ifDescr'])."</div>
|
||||
<a href='device/".$device['device_id']."/port/".$port['interface_id']."/' onmouseover=\"return overlib('\
|
||||
<div style=\'font-size: 16px; padding:5px; font-weight: bold; color: #e5e5e5;\'>".$device['hostname']." - ".$port['ifDescr']."</div>\
|
||||
".$port['ifAlias']." \
|
||||
<img src=\'graph.php?type=$graph_type&if=".$port['interface_id']."&from=-2day&to=".$now."&width=450&height=150\'>\
|
||||
<img src=\'graph.php?type=$graph_type&id=".$port['interface_id']."&from=-2day&to=".$now."&width=450&height=150\'>\
|
||||
', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >".
|
||||
"<img src='graph.php?type=$graph_type&if=".$port['interface_id']."&from=-2day&to=".$now."&width=132&height=40&legend=no'>
|
||||
"<img src='graph.php?type=$graph_type&id=".$port['interface_id']."&from=-2day&to=".$now."&width=132&height=40&legend=no'>
|
||||
</a>
|
||||
<div style='font-size: 9px;'>".truncate(short_port_descr($port['ifAlias']), 22, '')."</div>
|
||||
</div>");
|
||||
@ -35,4 +35,4 @@ while ($port = mysql_fetch_assoc($ports_query))
|
||||
echo("</td>");
|
||||
echo("</tr>");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -2,13 +2,47 @@
|
||||
|
||||
print_optionbar_start();
|
||||
|
||||
echo("
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/vrfs/'>Basic</a> | Graphs :
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/vrfs/bits/'>Bits</a> |
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/vrfs/upkts/'>Packets</a> |
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/vrfs/nupkts/'>NU Packets</a> |
|
||||
<a href='".$config['base_url']."/device/" . $device['device_id'] . "/vrfs/errors/'>Errors</a>
|
||||
");
|
||||
$menu_options = array('basic' => 'Basic',
|
||||
);
|
||||
|
||||
if (!$_GET['opta']) { $_GET['opta'] = "basic"; }
|
||||
|
||||
$sep = "";
|
||||
foreach ($menu_options as $option => $text)
|
||||
{
|
||||
echo($sep);
|
||||
if ($_GET['opta'] == $option) { echo("<span class='pagemenu-selected'>"); }
|
||||
echo('<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/vrfs/' . $option . ($_GET['optb'] ? '/' . $_GET['optb'] : ''). '/">' . $text
|
||||
. '</a>');
|
||||
if ($_GET['opta'] == $option) { echo("</span>"); }
|
||||
$sep = " | ";
|
||||
}
|
||||
|
||||
unset($sep);
|
||||
|
||||
echo(' Graphs: ');
|
||||
|
||||
$graph_types = array("bits" => "Bits",
|
||||
"upkts" => "Unicast Packets",
|
||||
"nupkts" => "Non-Unicast Packets",
|
||||
"errors" => "Errors",
|
||||
"etherlike" => "Etherlike");
|
||||
|
||||
foreach ($graph_types as $type => $descr)
|
||||
{
|
||||
echo("$type_sep");
|
||||
if ($_GET['optb'] == $type) { echo("<span class='pagemenu-selected'>"); }
|
||||
echo('<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/vrfs/graphs/'.$type.'/">'.$descr.'</a>');
|
||||
if ($_GET['optb'] == $type) { echo("</span>"); }
|
||||
|
||||
# echo('(');
|
||||
# if ($_GET['optb'] == $type) { echo("<span class='pagemenu-selected'>"); }
|
||||
# echo('<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/vrfs/'.$type.'/thumbs/">Mini</a>');
|
||||
# if ($_GET['optb'] == $type) { echo("</span>"); }
|
||||
# echo(')');
|
||||
$type_sep = " | ";
|
||||
}
|
||||
|
||||
print_optionbar_end();
|
||||
|
||||
echo("<div style='margin: 5px;'><table border=0 cellspacing=0 cellpadding=5 width=100%>");
|
||||
@ -22,4 +56,4 @@ while ($vrf = mysql_fetch_assoc($vrf_query))
|
||||
|
||||
echo("</table></div>");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user