2011-08-23 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_networkmap.php: added parameter to cut the names by default is true. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4805 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
1182eef652
commit
326486cd5b
|
@ -1,3 +1,8 @@
|
||||||
|
2011-08-23 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* include/functions_networkmap.php: added parameter to cut the names
|
||||||
|
by default is true.
|
||||||
|
|
||||||
2011-08-23 KIKUCHI Koichiro <koichiro@rworks.jp>
|
2011-08-23 KIKUCHI Koichiro <koichiro@rworks.jp>
|
||||||
|
|
||||||
* operation/agentes/exportdata.php: Fixed format character for default
|
* operation/agentes/exportdata.php: Fixed format character for default
|
||||||
|
|
|
@ -42,7 +42,9 @@ function networkmap_is_descendant ($node, $ascendant, $parents) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate a dot graph definition for graphviz
|
// Generate a dot graph definition for graphviz
|
||||||
function networkmap_generate_dot ($pandora_name, $group = 0, $simple = 0, $font_size = 12, $layout = 'radial', $nooverlap = 0, $zoom = 1, $ranksep = 2.5, $center = 0, $regen = 1, $pure = 0, $id_networkmap = 0, $show_snmp_modules = 0) {
|
function networkmap_generate_dot ($pandora_name, $group = 0, $simple = 0, $font_size = 12,
|
||||||
|
$layout = 'radial', $nooverlap = 0, $zoom = 1, $ranksep = 2.5, $center = 0,
|
||||||
|
$regen = 1, $pure = 0, $id_networkmap = 0, $show_snmp_modules = 0, $cut_names = true) {
|
||||||
$parents = array();
|
$parents = array();
|
||||||
$orphans = array();
|
$orphans = array();
|
||||||
|
|
||||||
|
@ -133,7 +135,7 @@ function networkmap_generate_dot ($pandora_name, $group = 0, $simple = 0, $font_
|
||||||
|
|
||||||
switch($node['type']){
|
switch($node['type']){
|
||||||
case 'agent':
|
case 'agent':
|
||||||
$graph .= networkmap_create_agent_node ($node , $simple, $font_size)."\n\t\t";
|
$graph .= networkmap_create_agent_node ($node , $simple, $font_size, $cut_names)."\n\t\t";
|
||||||
break;
|
break;
|
||||||
case 'module':
|
case 'module':
|
||||||
$graph .= networkmap_create_module_node ($node , $simple, $font_size)."\n\t\t";
|
$graph .= networkmap_create_module_node ($node , $simple, $font_size)."\n\t\t";
|
||||||
|
@ -403,7 +405,7 @@ function networkmap_create_group_node ($group, $simple = 0, $font_size = 10) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns a node definition
|
// Returns a node definition
|
||||||
function networkmap_create_agent_node ($agent, $simple = 0, $font_size = 10) {
|
function networkmap_create_agent_node ($agent, $simple = 0, $font_size = 10, $cut_names = true) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$status = agents_get_status($agent['id_agente']);
|
$status = agents_get_status($agent['id_agente']);
|
||||||
|
@ -429,7 +431,7 @@ function networkmap_create_agent_node ($agent, $simple = 0, $font_size = 10) {
|
||||||
|
|
||||||
// Short name
|
// Short name
|
||||||
$name = io_safe_output(strtolower ($agent["nombre"]));
|
$name = io_safe_output(strtolower ($agent["nombre"]));
|
||||||
if (strlen ($name) > 16) {
|
if ((strlen ($name) > 16) && ($cut_names)) {
|
||||||
$name = substr ($name, 0, 16) . '...';
|
$name = substr ($name, 0, 16) . '...';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue