mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
move vrfs into routing for devices
git-svn-id: http://www.observium.org/svn/observer/trunk@2197 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -4,7 +4,7 @@ if (is_integer($i/2)) { $bg_colour = $list_colour_a; } else { $bg_colour = $list
|
|||||||
|
|
||||||
echo("<tr bgcolor='$bg_colour'>");
|
echo("<tr bgcolor='$bg_colour'>");
|
||||||
|
|
||||||
echo("<td width=200 class=list-large><a href='vrf/".$vrf['mplsVpnVrfRouteDistinguisher']."/'>" . $vrf['vrf_name'] . "</a></td>");
|
echo("<td width=200 class=list-large><a href='routing/vrf/".$vrf['mplsVpnVrfRouteDistinguisher']."/'>" . $vrf['vrf_name'] . "</a></td>");
|
||||||
echo("<td width=150 class=box-desc>" . $vrf['mplsVpnVrfDescription'] . "</td>");
|
echo("<td width=150 class=box-desc>" . $vrf['mplsVpnVrfDescription'] . "</td>");
|
||||||
echo("<td width=100 class=box-desc>" . $vrf['mplsVpnVrfRouteDistinguisher'] . "</td>");
|
echo("<td width=100 class=box-desc>" . $vrf['mplsVpnVrfRouteDistinguisher'] . "</td>");
|
||||||
|
|
||||||
@@ -12,9 +12,9 @@ echo('<td class="list-bold">');
|
|||||||
$ports_query = mysql_query("SELECT * FROM ports WHERE `device_id` = '" . $device['device_id'] . "' AND `ifVrf` = '" . $vrf['vrf_id'] . "' ");
|
$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))
|
while ($port = mysql_fetch_assoc($ports_query))
|
||||||
{
|
{
|
||||||
if ($_GET['opta'] == "graphs")
|
if ($_GET['optb'] == "graphs")
|
||||||
{
|
{
|
||||||
$graph_type = "port_" . $_GET['optb'];
|
$graph_type = "port_" . $_GET['optc'];
|
||||||
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;'>
|
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>
|
<div style='font-weight: bold;'>".makeshortif($port['ifDescr'])."</div>
|
||||||
<a href='device/".$device['device_id']."/port/".$port['interface_id']."/' onmouseover=\"return overlib('\
|
<a href='device/".$device['device_id']."/port/".$port['interface_id']."/' onmouseover=\"return overlib('\
|
||||||
|
@@ -110,14 +110,14 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
|||||||
</li>');
|
</li>');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (@mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0')
|
# if (@mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0')
|
||||||
{
|
# {
|
||||||
echo('<li class="' . $select['vrfs'] . '">
|
# echo('<li class="' . $select['vrfs'] . '">
|
||||||
<a href="device/' . $device['device_id'] . '/vrfs/">
|
# <a href="device/' . $device['device_id'] . '/vrfs/">
|
||||||
<img src="images/16/layers.png" align="absmiddle" border="0" /> VRFs
|
# <img src="images/16/layers.png" align="absmiddle" border="0" /> VRFs
|
||||||
</a>
|
# </a>
|
||||||
</li>');
|
# </li>');
|
||||||
}
|
# }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -3,6 +3,11 @@
|
|||||||
|
|
||||||
$datas[] = 'overview';
|
$datas[] = 'overview';
|
||||||
|
|
||||||
|
if (@mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0')
|
||||||
|
{
|
||||||
|
$datas[] = 'vrf';
|
||||||
|
}
|
||||||
|
|
||||||
$bgp_count = mysql_result(mysql_query("select count(*) from bgpPeers WHERE device_id = '" . $device['device_id'] . "'"), 0);
|
$bgp_count = mysql_result(mysql_query("select count(*) from bgpPeers WHERE device_id = '" . $device['device_id'] . "'"), 0);
|
||||||
if ($bgp_count) { $datas[] = 'bgp'; }
|
if ($bgp_count) { $datas[] = 'bgp'; }
|
||||||
|
|
||||||
@@ -12,11 +17,11 @@ if ($cef_count) { $datas[] = 'cef'; }
|
|||||||
$ospf_count = mysql_result(mysql_query("select count(*) from ospf_instances WHERE device_id = '" . $device['device_id'] . "'"), 0);
|
$ospf_count = mysql_result(mysql_query("select count(*) from ospf_instances WHERE device_id = '" . $device['device_id'] . "'"), 0);
|
||||||
if ($ospf_count) { $datas[] = 'ospf'; }
|
if ($ospf_count) { $datas[] = 'ospf'; }
|
||||||
|
|
||||||
|
|
||||||
$type_text['overview'] = "Overview";
|
$type_text['overview'] = "Overview";
|
||||||
$type_text['bgp'] = "BGP";
|
$type_text['bgp'] = "BGP";
|
||||||
$type_text['cef'] = "CEF";
|
$type_text['cef'] = "CEF";
|
||||||
$type_text['ospf'] = "OSPF";
|
$type_text['ospf'] = "OSPF";
|
||||||
|
$type_text['vrf'] = "VRFs";
|
||||||
|
|
||||||
print_optionbar_start();
|
print_optionbar_start();
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@ foreach ($menu_options as $option => $text)
|
|||||||
{
|
{
|
||||||
echo($sep);
|
echo($sep);
|
||||||
if ($_GET['opta'] == $option) { echo("<span class='pagemenu-selected'>"); }
|
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
|
echo('<a href="device/' . $device['device_id'] . '/routing/vrf/' . $option . ($_GET['optc'] ? '/' . $_GET['optc'] : ''). '/">' . $text
|
||||||
. '</a>');
|
. '</a>');
|
||||||
if ($_GET['opta'] == $option) { echo("</span>"); }
|
if ($_GET['opta'] == $option) { echo("</span>"); }
|
||||||
$sep = " | ";
|
$sep = " | ";
|
||||||
@@ -31,9 +31,9 @@ $graph_types = array("bits" => "Bits",
|
|||||||
foreach ($graph_types as $type => $descr)
|
foreach ($graph_types as $type => $descr)
|
||||||
{
|
{
|
||||||
echo("$type_sep");
|
echo("$type_sep");
|
||||||
if ($_GET['optb'] == $type) { echo("<span class='pagemenu-selected'>"); }
|
if ($_GET['optc'] == $type) { echo("<span class='pagemenu-selected'>"); }
|
||||||
echo('<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/vrfs/graphs/'.$type.'/">'.$descr.'</a>');
|
echo('<a href="device/' . $device['device_id'] . '/routing/vrf/graphs/'.$type.'/">'.$descr.'</a>');
|
||||||
if ($_GET['optb'] == $type) { echo("</span>"); }
|
if ($_GET['optc'] == $type) { echo("</span>"); }
|
||||||
|
|
||||||
# echo('(');
|
# echo('(');
|
||||||
# if ($_GET['optb'] == $type) { echo("<span class='pagemenu-selected'>"); }
|
# if ($_GET['optb'] == $type) { echo("<span class='pagemenu-selected'>"); }
|
Reference in New Issue
Block a user