mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
unflatten map when flat map is ugly (>10 links?)
git-svn-id: http://www.observium.org/svn/observer/trunk@1685 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
12
html/map.php
12
html/map.php
@@ -2,6 +2,8 @@
|
||||
|
||||
### FIXME : remove link when port/host is not in the database (things /seen/ but not *discovered*)
|
||||
|
||||
$links = 1;
|
||||
|
||||
include("../includes/defaults.inc.php");
|
||||
include("../config.php");
|
||||
include("../includes/functions.php");
|
||||
@@ -66,6 +68,8 @@ if (isset($_GET['format']) && preg_match("/^[a-z]*$/", $_GET['format']))
|
||||
{
|
||||
$linkdone[] = "$local_interface_id $remote_interface_id";
|
||||
|
||||
$links++;
|
||||
|
||||
if($link['ifSpeed'] >= "10000000000")
|
||||
{
|
||||
$info = "color=red3 style=\"setlinewidth(6)\"";
|
||||
@@ -138,8 +142,12 @@ if (isset($_GET['format']) && preg_match("/^[a-z]*$/", $_GET['format']))
|
||||
$_GET['format'] = 'png';
|
||||
}
|
||||
|
||||
#$maptool = 'unflatten -f -l 5 |dot';
|
||||
$maptool = 'dot';
|
||||
if($links > 10) ### Unflatten if there are more than 10 links. beyond that it gets messy
|
||||
{
|
||||
$maptool = 'unflatten -f -l 5 |dot';
|
||||
} else {
|
||||
$maptool = 'dot';
|
||||
}
|
||||
|
||||
if ($where == '') { $maptool = 'neato -Gpack'; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user