mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02: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:
@@ -2,7 +2,7 @@
|
||||
|
||||
if ($vars['tab'] == "port" && is_numeric($vars['device']) && port_permitted($vars['port']))
|
||||
{
|
||||
$check_device = get_device_id_by_interface_id($vars['port']);
|
||||
$check_device = get_device_id_by_port_id($vars['port']);
|
||||
$permit_ports = 1;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ if (device_permitted($vars['device']) || $check_device == $vars['device'])
|
||||
</li>');
|
||||
}
|
||||
|
||||
if (@dbFetchCell("SELECT COUNT(interface_id) FROM ports WHERE device_id = '" . $device['device_id'] . "'") > '0')
|
||||
if (@dbFetchCell("SELECT COUNT(port_id) FROM ports WHERE device_id = '" . $device['device_id'] . "'") > '0')
|
||||
{
|
||||
echo('<li class="' . $select['ports'] . $select['port'] . '">
|
||||
<a href="'.generate_device_url($device, array('tab' => 'ports')). '">
|
||||
@@ -236,7 +236,7 @@ if (device_permitted($vars['device']) || $check_device == $vars['device'])
|
||||
</li>');
|
||||
}
|
||||
|
||||
if ($_SESSION['userlevel'] >= "5" && dbFetchCell("SELECT COUNT(*) FROM links AS L, ports AS I WHERE I.device_id = '".$device['device_id']."' AND I.interface_id = L.local_interface_id"))
|
||||
if ($_SESSION['userlevel'] >= "5" && dbFetchCell("SELECT COUNT(*) FROM links AS L, ports AS I WHERE I.device_id = '".$device['device_id']."' AND I.port_id = L.local_port_id"))
|
||||
{
|
||||
$discovery_links = TRUE;
|
||||
echo('<li class="' . $select['map'] . '">
|
||||
|
||||
Reference in New Issue
Block a user