Some fixes.

This commit is contained in:
mdtrooper 2016-04-26 15:03:53 +02:00
parent 67a65d84b1
commit 78f044dbf5
4 changed files with 10 additions and 6 deletions

View File

@ -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.

View File

@ -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);

View File

@ -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=<<TABLE data-status="' . $module_group['status'] . '" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR><TD>' .
'label=<<TABLE data-id_agent="' . $module_group['id_agent'] . '" data-status="' . $module_group['status'] . '" CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR><TD>' .
io_safe_output($module_group['name']) . '</TD></TR></TABLE>>,
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;
}

View File

@ -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 '<fieldset><legend>' . __('Main') . '</legend>';
html_print_table($table);