mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix os on old cisco kit. a bit.
git-svn-id: http://www.observium.org/svn/observer/trunk@2677 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
18
html/map.php
18
html/map.php
@@ -39,7 +39,7 @@ if (isset($_GET['device'])) { $where = "WHERE device_id = ".mres($_GET['device']
|
||||
|
||||
if (isset($_GET['format']) && preg_match("/^[a-z]*$/", $_GET['format']))
|
||||
{
|
||||
$map = 'digraph G { sep=0.01; size="120,50.5"; pack=100; bgcolor=transparent; splines=true; overlap=scale; concentrate=0; epsilon=0.001; rankdir=0;
|
||||
$map = 'digraph G { sep=0.01; size="12,5.5"; pack=100; bgcolor=transparent; splines=true; overlap=scale; concentrate=0; epsilon=0.001; rankdir=0;
|
||||
node [ fontname="helvetica", fontstyle=bold, style=filled, color=white, fillcolor=lightgrey, overlap=false];
|
||||
edge [ bgcolor=white, fontname="helvetica", fontstyle=bold, arrowhead=dot, arrowtail=dot];
|
||||
graph [bgcolor=transparent];
|
||||
@@ -145,10 +145,10 @@ if (isset($_GET['format']) && preg_match("/^[a-z]*$/", $_GET['format']))
|
||||
$map .= "
|
||||
};";
|
||||
|
||||
# if ($_GET['debug'] == 1)
|
||||
# {
|
||||
# echo("<pre>$map</pre>");exit();
|
||||
# }
|
||||
if ($_GET['debug'] == 1)
|
||||
{
|
||||
echo("<pre>$map</pre>");exit();
|
||||
}
|
||||
|
||||
switch ($_GET['format'])
|
||||
{
|
||||
@@ -161,16 +161,16 @@ if (isset($_GET['format']) && preg_match("/^[a-z]*$/", $_GET['format']))
|
||||
|
||||
if ($links > 30) ### Unflatten if there are more than 10 links. beyond that it gets messy
|
||||
{
|
||||
$maptool = $config['unflatten'] . ' -f -l 5 | ' . $config['neato'];
|
||||
$maptool = $config['unflatten'] . ' -f -l 5 | ' . $config['sfdp'] . ' -Gpack -Gcharset=latin1 -Gsize=11,9';
|
||||
} else {
|
||||
$maptool = $config['neato'];
|
||||
$maptool = $config['dot'];
|
||||
}
|
||||
|
||||
# if ($where == '') { $maptool = $config['sfdp'] . ' -Gpack -Gcharset=latin1 -Gsize=200,200'; }
|
||||
# if ($where == '') { $maptool = $config['sfdp'] . ' -Gpack -Gcharset=latin1 -Gsize=20,20'; }
|
||||
|
||||
$descriptorspec = array(0 => array("pipe", "r"),1 => array("pipe", "w") );
|
||||
|
||||
$process = proc_open($maptool.' -T'.$_GET['format'],$descriptorspec,$pipes);
|
||||
$process = proc_open($maptool.' -T'.$_GET['format'],$descriptorspec,$pipes);
|
||||
|
||||
if (is_resource($process)) {
|
||||
fwrite($pipes[0], "$map");
|
||||
|
||||
Reference in New Issue
Block a user