diff --git a/pandora_console/include/class/Networkmap.class.php b/pandora_console/include/class/Networkmap.class.php index 8cb3f6ac55..5bbe52f062 100644 --- a/pandora_console/include/class/Networkmap.class.php +++ b/pandora_console/include/class/Networkmap.class.php @@ -166,6 +166,8 @@ class Networkmap extends Map { $type = ITEM_TYPE_MODULEGROUP_NETWORKMAP; preg_match("/data-status=\"([0-9]*)\"/", $chunks[1], $matches); $status = $matches[1]; + preg_match("/data-id_agent=\"([0-9]*)\"/", $chunks[1], $matches); + $id_agent = $matches[1]; $shape = "rhombus"; //The module group has not icon. diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index 30d6f4cd04..1d28871795 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -479,7 +479,7 @@ define("STATUS_ERROR", 1); define("MAP_TYPE_NETWORKMAP", 0); define("MAP_TYPE_VISUALMAP", 1); -define("MAP_REFRESH_TIME", 10000); +define("MAP_REFRESH_TIME", SECONDS_5MINUTES); define("MAP_SUBTYPE_TOPOLOGY", 0); define("MAP_SUBTYPE_POLICIES", 1); diff --git a/pandora_console/include/functions_networkmap.php b/pandora_console/include/functions_networkmap.php index 34af4bc99d..dd00208750 100644 --- a/pandora_console/include/functions_networkmap.php +++ b/pandora_console/include/functions_networkmap.php @@ -607,6 +607,8 @@ function networkmap_get_nodes_and_links($pandora_name, $group = 0, $module_group['id_server'] = $agent['id_server']; $module_group['id_node'] = $node_count; $module_group['parent'] = $agent['id_node']; + $module_group['id_module_group'] = $module['id_module_group']; + $module_group['id_agent'] = $agent['id_agente']; $nodes[$node_count] = $module_group; $id_node_module_group = $node_count; @@ -1575,7 +1577,7 @@ function networkmap_create_module_group_node ($module_group, $simple = 0, $font_ $node = $module_group['id_node'].' [ color="' . $status_color . '", fontsize='.$font_size.', style="filled", ' . 'fixedsize=true, width=0.30, height=0.30, ' . - 'label=<
' . + 'label=<
' . io_safe_output($module_group['name']) . '
>, shape="square", URL="' . $url . '", tooltip="' . $url_tooltip . '"];'; @@ -1846,7 +1848,7 @@ function networkmap_open_graph ($layout, $nooverlap, $pure, $zoom, $head .= "root=0;"; $head .= "size=\"$size\";"; - + $head .= "\n"; return $head; } diff --git a/pandora_console/operation/maps/networkmap_editor.php b/pandora_console/operation/maps/networkmap_editor.php index 469cc8f92b..37fbdb9778 100644 --- a/pandora_console/operation/maps/networkmap_editor.php +++ b/pandora_console/operation/maps/networkmap_editor.php @@ -36,7 +36,7 @@ if ($create_networkmap) { $description = ""; $width = NETWORKMAP_DEFAULT_WIDTH; $height = NETWORKMAP_DEFAULT_HEIGHT; - $source_period = SECONDS_5MINUTES; + $source_period = MAP_REFRESH_TIME; $source = MAP_SOURCE_GROUP; $source_data = ''; $generation_method = MAP_GENERATION_CIRCULAR; @@ -201,8 +201,8 @@ else { 4, 10,true); $table->data[7][0] = __('Refresh time'); - $table->data[7][1] = html_print_input_text ('source_period', $source_period, '', 8, - 20,true); + $table->data[7][1] = html_print_input_text ('source_period', + $source_period, '', 8, 20, true); echo '
' . __('Main') . ''; html_print_table($table);