mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
new things! vrfs!
git-svn-id: http://www.observium.org/svn/observer/trunk@256 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -69,7 +69,12 @@
|
||||
if($device['os'] == "IOS") {
|
||||
|
||||
if($interface['ifTrunk']) { echo("<span class=box-desc><span class=red>" . $interface['ifTrunk'] . "</span></span>");
|
||||
} elseif ($interface['ifVlan']) { echo("<span class=box-desc><span class=blue>VLAN " . $interface['ifVlan'] . "</span></span>"); }
|
||||
} elseif ($interface['ifVlan']) { echo("<span class=box-desc><span class=blue>VLAN " . $interface['ifVlan'] . "</span></span>");
|
||||
} elseif ($interface['ifVrf']) {
|
||||
$vrf = mysql_fetch_array(mysql_query("SELECT * FROM vrfs WHERE vrf_id = '".$interface['ifVrf']."'"));
|
||||
echo("<span style='color: green;'>" . $vrf['vrf_name'] . "</span>");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
if(is_integer($i/2)) { $bg_colour = $list_colour_a; } else { $bg_colour = $list_colour_b; }
|
||||
|
||||
echo("<tr bgcolor='$bg_colour'>");
|
||||
|
||||
echo("<td class=list-large> " . $vrf['vrf_name'] . "</td>");
|
||||
echo("<td class=box-desc>" . $vrf['mplsVpnVrfRouteDistinguisher'] . "</td>");
|
||||
|
||||
echo("<td class=list-bold>");
|
||||
$ports_query = mysql_query("SELECT * FROM interfaces WHERE `device_id` = '" . $device['device_id'] . "' AND `ifVrf` = '" . $vrf['vrf_id'] . "' ");
|
||||
while($port = mysql_fetch_array($ports_query)) {
|
||||
|
||||
echo($vrf['port_sep'] . generateiflink($port, makeshortif($port['ifDescr'])));
|
||||
$vrf['port_sep'] = ", ";
|
||||
}
|
||||
echo("</td>");
|
||||
echo("</tr>");
|
||||
|
||||
?>
|
||||
@@ -39,6 +39,16 @@ if(@mysql_result(mysql_query("select count(vlan_id) from vlans WHERE device_id =
|
||||
</li>");
|
||||
}
|
||||
|
||||
if(@mysql_result(mysql_query("select count(*) from vrfs WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0') {
|
||||
echo("
|
||||
<li class=" . $select['dev-vrfs'] . ">
|
||||
<a href='?page=device&id=" . $device['device_id'] . "§ion=dev-vrfs' >
|
||||
<img src='images/16/layers.png' align=absmiddle border=0> VRFs
|
||||
</a>
|
||||
</li>");
|
||||
}
|
||||
|
||||
|
||||
if($config['enable_bgp'] && $device['bgpLocalAs']) {
|
||||
echo("
|
||||
<li class=" . $select['dev-bgp'] . ">
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
echo("<div style='margin: 5px;'><table border=0 cellspacing=0 cellpadding=5 width=100%>");
|
||||
$i = "1";
|
||||
$vrf_query = mysql_query("select * from vrfs WHERE device_id = '".$_GET['id']."' ORDER BY 'vrf_name'");
|
||||
while($vrf = mysql_fetch_array($vrf_query)) {
|
||||
include("includes/print-vrf.inc");
|
||||
$i++;
|
||||
}
|
||||
echo("</table></div>");
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user