Files
librenms-librenms/html/pages/device/routing.inc.php
T

66 lines
1.7 KiB
PHP
Raw Normal View History

2011-04-17 15:55:38 +00:00
<?php
2011-09-19 08:54:48 +00:00
$link_array = array('page' => 'device',
'device' => $device['device_id'],
'tab' => 'routing');
#$type_text['overview'] = "Overview";
2011-09-12 13:53:37 +00:00
$type_text['ipsec_tunnels'] = "IPSEC Tunnels";
2011-04-17 15:55:38 +00:00
$type_text['bgp'] = "BGP";
2011-04-19 21:54:43 +00:00
$type_text['cef'] = "CEF";
$type_text['ospf'] = "OSPF";
2011-04-28 15:01:36 +00:00
$type_text['vrf'] = "VRFs";
2011-04-17 15:55:38 +00:00
print_optionbar_start();
echo("<span style='font-weight: bold;'>Routing</span> &#187; ");
2011-04-17 15:55:38 +00:00
unset($sep);
foreach ($routing_tabs as $type)
2011-04-17 15:55:38 +00:00
{
2011-09-19 08:54:48 +00:00
if (!$vars['proto']) { $vars['proto'] = $type; }
2011-04-17 15:55:38 +00:00
echo($sep);
2011-09-19 08:54:48 +00:00
if ($vars['proto'] == $type)
2011-04-17 15:55:38 +00:00
{
echo('<span class="pagemenu-selected">');
}
2011-09-19 08:54:48 +00:00
echo(generate_link($type_text[$type] ." (".$device_routing_count[$type].")",$link_array,array('proto'=>$type)));
if ($vars['proto'] == $type) { echo("</span>"); }
2011-04-17 15:55:38 +00:00
$sep = " | ";
}
print_optionbar_end();
2011-09-19 08:54:48 +00:00
if (is_file("pages/device/routing/".mres($vars['proto']).".inc.php"))
2011-04-17 15:55:38 +00:00
{
2011-09-19 08:54:48 +00:00
include("pages/device/routing/".mres($vars['proto']).".inc.php");
2011-04-17 15:55:38 +00:00
} else {
foreach ($routing_tabs as $type)
2011-04-17 15:55:38 +00:00
{
if ($type != "overview")
{
2011-09-20 14:37:54 +00:00
if (is_file("pages/device/routing/overview/".mres($type).".inc.php")) {
2011-04-27 02:03:33 +00:00
$g_i++;
if (!is_integer($g_i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
echo('<div style="background-color: '.$row_colour.';">');
2011-04-27 14:59:50 +00:00
echo('<div style="padding:4px 0px 0px 8px;"><span class=graphhead>'.$type_text[$type].'</span>');
2011-04-27 02:03:33 +00:00
include("pages/device/routing/overview/".mres($type).".inc.php");
echo('</div>');
2011-04-27 14:59:50 +00:00
echo('</div>');
2011-04-27 02:03:33 +00:00
} else {
$graph_title = $type_text[$type];
$graph_type = "device_".$type;
include("includes/print-device-graph.php");
}
2011-04-17 15:55:38 +00:00
}
}
}
?>