librenms/html/pages/device/vrfs.inc.php
Adam Amstrong 5ab12a5641 fix up device/vrfs page
git-svn-id: http://www.observium.org/svn/observer/trunk@2049 61d68cd4-352d-0410-923a-c4978735b2b8
2011-04-09 17:02:51 +00:00

60 lines
1.7 KiB
PHP

<?php
print_optionbar_start();
$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%>");
$i = "0";
$vrf_query = mysql_query("select * from vrfs WHERE device_id = '".$device['device_id']."' ORDER BY 'vrf_name'");
while ($vrf = mysql_fetch_assoc($vrf_query))
{
include("includes/print-vrf.inc.php");
$i++;
}
echo("</table></div>");
?>