Added flag to disable port relationship in ports list for a device

This commit is contained in:
laf
2015-05-13 23:01:26 +01:00
parent dc0c673009
commit 4a9b01caf0
2 changed files with 4 additions and 3 deletions

View File

@ -143,7 +143,7 @@ if (strpos($port['label'], "oopback") === false && !$graph_type)
unset($br);
if ($port_details)
if ($port_details && $config['enable_port_relationship'] === TRUE)
{ // Show which other devices are on the same subnet as this interface
foreach (dbFetchRows("SELECT `ipv4_network_id` FROM `ipv4_addresses` WHERE `port_id` = ? AND `ipv4_address` NOT LIKE '127.%'", array($port['port_id'])) as $net)
{
@ -187,7 +187,7 @@ if (strpos($port['label'], "oopback") === false && !$graph_type)
}
}
if ($port_details)
if ($port_details && $config['enable_port_relationship'] === TRUE)
{
foreach ($int_links as $int_link)
{
@ -208,7 +208,7 @@ if (strpos($port['label'], "oopback") === false && !$graph_type)
# unset($int_links, $int_links_v6, $int_links_v4, $int_links_phys, $br);
}
if ($port_details)
if ($port_details && $config['enable_port_relationship'] === TRUE)
{
foreach (dbFetchRows("SELECT * FROM `pseudowires` WHERE `port_id` = ?", array($port['port_id'])) as $pseudowire)
{