mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
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>
|
2014-06-25 Junichi Satoh <junichi@rworks.jp>
|
||||||
|
|
||||||
* include/help/ja/help_ff_interval.php,
|
* include/help/ja/help_ff_interval.php,
|
||||||
|
@ -550,15 +550,36 @@ function networkmap_generate_dot ($pandora_name, $group = 0,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a central node if orphan nodes exist
|
|
||||||
if (count ($orphans) || empty ($nodes)) {
|
|
||||||
$graph .= networkmap_create_pandora_node ($pandora_name, $font_size, $simple, $stats);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Define edges for orphan nodes
|
if ($l2_network) {
|
||||||
foreach (array_keys($orphans) as $node) {
|
$count = 0;
|
||||||
$graph .= networkmap_create_edge ('0', $node, $layout, $nooverlap, $pure, $zoom, $ranksep, $simple, $regen, $font_size, $group, 'operation/agentes/networkmap', 'topology', $id_networkmap);
|
$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);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Define edges for orphan nodes
|
||||||
|
foreach (array_keys($orphans) as $node) {
|
||||||
|
$graph .= networkmap_create_edge ('0', $node, $layout, $nooverlap, $pure, $zoom, $ranksep, $simple, $regen, $font_size, $group, 'operation/agentes/networkmap', 'topology', $id_networkmap);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close graph
|
// Close graph
|
||||||
@ -824,6 +845,14 @@ function networkmap_create_edge ($head, $tail, $layout, $nooverlap, $pure, $zoom
|
|||||||
return $edge;
|
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
|
// Returns a group node definition
|
||||||
function networkmap_create_group_node ($group, $simple = 0, $font_size = 10, $metaconsole = false, $id_server = null) {
|
function networkmap_create_group_node ($group, $simple = 0, $font_size = 10, $metaconsole = false, $id_server = null) {
|
||||||
global $config;
|
global $config;
|
||||||
@ -1245,6 +1274,14 @@ function networkmap_create_pandora_node ($name, $font_size = 10, $simple = 0, $s
|
|||||||
return $node;
|
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
|
// Opens a group definition
|
||||||
function networkmap_open_group ($id) {
|
function networkmap_open_group ($id) {
|
||||||
$img = 'images/'.groups_get_icon ($id).'.png';
|
$img = 'images/'.groups_get_icon ($id).'.png';
|
||||||
|
@ -84,6 +84,7 @@ else {
|
|||||||
$result = system ($cmd);
|
$result = system ($cmd);
|
||||||
fclose ($fh);
|
fclose ($fh);
|
||||||
unlink ($filename_dot);
|
unlink ($filename_dot);
|
||||||
|
//~ html_debug_print($cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user