mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
flatten map (it was like that for a reason :P) and list all ports deleted when deleting an interface
git-svn-id: http://www.observium.org/svn/observer/trunk@1650 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -138,7 +138,8 @@ if (isset($_GET['format']) && preg_match("/^[a-z]*$/", $_GET['format']))
|
|||||||
$_GET['format'] = 'png';
|
$_GET['format'] = 'png';
|
||||||
}
|
}
|
||||||
|
|
||||||
$maptool = 'unflatten -f -l 5 |dot';
|
#$maptool = 'unflatten -f -l 5 |dot';
|
||||||
|
$maptool = 'dot';
|
||||||
|
|
||||||
if ($where == '') { $maptool = 'neato -Gpack'; }
|
if ($where == '') { $maptool = 'neato -Gpack'; }
|
||||||
|
|
||||||
|
@@ -224,7 +224,7 @@ function delete_device($id)
|
|||||||
$int_if = $int_data['ifDescr'];
|
$int_if = $int_data['ifDescr'];
|
||||||
$int_id = $int_data['interface_id'];
|
$int_id = $int_data['interface_id'];
|
||||||
delete_port($int_id);
|
delete_port($int_id);
|
||||||
$ret = "Removed interface $int_id ($int_if)\n";
|
$ret .= "Removed interface $int_id ($int_if)\n";
|
||||||
}
|
}
|
||||||
mysql_query("DELETE FROM `entPhysical` WHERE `device_id` = '$id'");
|
mysql_query("DELETE FROM `entPhysical` WHERE `device_id` = '$id'");
|
||||||
mysql_query("DELETE FROM `devices_attribs` WHERE `device_id` = '$id'");
|
mysql_query("DELETE FROM `devices_attribs` WHERE `device_id` = '$id'");
|
||||||
@@ -244,7 +244,8 @@ function delete_device($id)
|
|||||||
mysql_query("DELETE FROM `current` WHERE `device_id` = '$id'");
|
mysql_query("DELETE FROM `current` WHERE `device_id` = '$id'");
|
||||||
mysql_query("DELETE FROM `sensors` WHERE `device_id` = '$id'");
|
mysql_query("DELETE FROM `sensors` WHERE `device_id` = '$id'");
|
||||||
shell_exec("rm -rf ".trim($config['rrd_dir'])."/$host");
|
shell_exec("rm -rf ".trim($config['rrd_dir'])."/$host");
|
||||||
return $ret . "Removed device $host\n";
|
$ret = "Removed Device $host\n";
|
||||||
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
function addHost($host, $community, $snmpver, $port = 161)
|
function addHost($host, $community, $snmpver, $port = 161)
|
||||||
|
Reference in New Issue
Block a user