mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
move from port_id to interface_id. make ports discovery only discover. add some cleaner functions. add a tiny bit of alerting infrastructure.
git-svn-id: http://www.observium.org/svn/observer/trunk@3195 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -24,21 +24,21 @@ print_optionbar_end();
|
||||
|
||||
echo("<table cellpadding=5 cellspacing=0 class=devicetable width=100%>");
|
||||
|
||||
foreach (dbFetchRows("SELECT * FROM pseudowires AS P, ports AS I WHERE P.interface_id = I.interface_id AND I.device_id = ? ORDER BY I.ifDescr", array($device['device_id'])) as $pw_a)
|
||||
foreach (dbFetchRows("SELECT * FROM pseudowires AS P, ports AS I WHERE P.port_id = I.port_id AND I.device_id = ? ORDER BY I.ifDescr", array($device['device_id'])) as $pw_a)
|
||||
{
|
||||
$i = 0;
|
||||
while ($i < count($linkdone))
|
||||
{
|
||||
$thislink = $pw_a['device_id'] . $pw_a['interface_id'];
|
||||
$thislink = $pw_a['device_id'] . $pw_a['port_id'];
|
||||
if ($linkdone[$i] == $thislink) { $skip = "yes"; }
|
||||
$i++;
|
||||
}
|
||||
|
||||
$pw_b = dbFetchRow("SELECT * from `devices` AS D, `ports` AS I, `pseudowires` AS P WHERE D.device_id = ? AND D.device_id = I.device_id
|
||||
AND P.cpwVcID = ? AND P.interface_id = I.interface_id", array($pw_a['peer_device_id'], $pw_a['cpwVcID']));
|
||||
AND P.cpwVcID = ? AND P.port_id = I.port_id", array($pw_a['peer_device_id'], $pw_a['cpwVcID']));
|
||||
|
||||
if (!port_permitted($pw_a['interface_id'])) { $skip = "yes"; }
|
||||
if (!port_permitted($pw_b['interface_id'])) { $skip = "yes"; }
|
||||
if (!port_permitted($pw_a['port_id'])) { $skip = "yes"; }
|
||||
if (!port_permitted($pw_b['port_id'])) { $skip = "yes"; }
|
||||
|
||||
if ($skip)
|
||||
{
|
||||
@@ -88,7 +88,7 @@ foreach (dbFetchRows("SELECT * FROM pseudowires AS P, ports AS I WHERE P.interfa
|
||||
echo("</td></tr>");
|
||||
}
|
||||
|
||||
$linkdone[] = $pw_b['device_id'] . $pw_b['interface_id'];
|
||||
$linkdone[] = $pw_b['device_id'] . $pw_b['port_id'];
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user