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:
Adam Amstrong
2010-08-05 23:21:57 +00:00
parent 86f0647ded
commit c8c80a7dcf
2 changed files with 6 additions and 4 deletions

View File

@@ -138,7 +138,8 @@ if (isset($_GET['format']) && preg_match("/^[a-z]*$/", $_GET['format']))
$_GET['format'] = 'png';
}
$maptool = 'unflatten -f -l 5 |dot';
#$maptool = 'unflatten -f -l 5 |dot';
$maptool = 'dot';
if ($where == '') { $maptool = 'neato -Gpack'; }

View File

@@ -224,7 +224,7 @@ function delete_device($id)
$int_if = $int_data['ifDescr'];
$int_id = $int_data['interface_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 `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 `sensors` WHERE `device_id` = '$id'");
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)