2014-06-25 Miguel de Dios <miguel.dedios@artica.es>
* operation/agentes/networkmap.topology.php, include/functions_networkmap.php: fixed the networkmaps of level 2, now the nodes without conections with others are more or less clean posicioned into the networkmap. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10284 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
29ffc516cc
commit
5e3dbbb23d
|
@ -1,3 +1,10 @@
|
|||
2014-06-25 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* operation/agentes/networkmap.topology.php,
|
||||
include/functions_networkmap.php: fixed the networkmaps of level 2,
|
||||
now the nodes without conections with others are more or less
|
||||
clean posicioned into the networkmap.
|
||||
|
||||
2014-06-25 Junichi Satoh <junichi@rworks.jp>
|
||||
|
||||
* include/help/ja/help_ff_interval.php,
|
||||
|
|
|
@ -551,6 +551,25 @@ function networkmap_generate_dot ($pandora_name, $group = 0,
|
|||
}
|
||||
}
|
||||
|
||||
if ($l2_network) {
|
||||
$count = 0;
|
||||
$group_nodes = 10;
|
||||
$graph .= networkmap_create_transparent_node($count);
|
||||
foreach (array_keys($orphans) as $node) {
|
||||
if ($group_nodes == 0) {
|
||||
$count++;
|
||||
$graph .= networkmap_create_transparent_node($count);
|
||||
|
||||
$group_nodes = 10;
|
||||
}
|
||||
|
||||
$graph .= networkmap_create_transparent_edge('transp_' . $count,
|
||||
$node);
|
||||
|
||||
$group_nodes--;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Create a central node if orphan nodes exist
|
||||
if (count ($orphans) || empty ($nodes)) {
|
||||
$graph .= networkmap_create_pandora_node ($pandora_name, $font_size, $simple, $stats);
|
||||
|
@ -561,6 +580,8 @@ function networkmap_generate_dot ($pandora_name, $group = 0,
|
|||
$graph .= networkmap_create_edge ('0', $node, $layout, $nooverlap, $pure, $zoom, $ranksep, $simple, $regen, $font_size, $group, 'operation/agentes/networkmap', 'topology', $id_networkmap);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Close graph
|
||||
$graph .= networkmap_close_graph ();
|
||||
|
||||
|
@ -824,6 +845,14 @@ function networkmap_create_edge ($head, $tail, $layout, $nooverlap, $pure, $zoom
|
|||
return $edge;
|
||||
}
|
||||
|
||||
function networkmap_create_transparent_edge($head, $tail) {
|
||||
// edgeURL allows node navigation
|
||||
$edge = "\n" . $head . ' -- ' . $tail .
|
||||
'[color="#00000000", headclip=false, tailclip=false, edgeURL=""];' . "\n";
|
||||
|
||||
return $edge;
|
||||
}
|
||||
|
||||
// Returns a group node definition
|
||||
function networkmap_create_group_node ($group, $simple = 0, $font_size = 10, $metaconsole = false, $id_server = null) {
|
||||
global $config;
|
||||
|
@ -1245,6 +1274,14 @@ function networkmap_create_pandora_node ($name, $font_size = 10, $simple = 0, $s
|
|||
return $node;
|
||||
}
|
||||
|
||||
function networkmap_create_transparent_node($count = 0) {
|
||||
|
||||
$node = 'transp_' .$count . ' [ color="#00000000", style="filled", fixedsize=true, width=0.8, height=0.6, label=<>,
|
||||
shape="ellipse"];';
|
||||
|
||||
return $node;
|
||||
}
|
||||
|
||||
// Opens a group definition
|
||||
function networkmap_open_group ($id) {
|
||||
$img = 'images/'.groups_get_icon ($id).'.png';
|
||||
|
|
|
@ -84,6 +84,7 @@ else {
|
|||
$result = system ($cmd);
|
||||
fclose ($fh);
|
||||
unlink ($filename_dot);
|
||||
//~ html_debug_print($cmd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue