changes in default values in networkmap
Former-commit-id: 650abcc24fc19e565b9737e80e602f7188114148
This commit is contained in:
parent
f557d09529
commit
1f1c9de887
|
@ -1236,7 +1236,7 @@ function networkmap_open_graph(
|
||||||
if (isset($map_filter['node_sep'])) {
|
if (isset($map_filter['node_sep'])) {
|
||||||
$node_sep = $map_filter['node_sep'];
|
$node_sep = $map_filter['node_sep'];
|
||||||
} else {
|
} else {
|
||||||
$node_sep = 0.25;
|
$node_sep = 0.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($map_filter['rank_sep'])) {
|
if (isset($map_filter['rank_sep'])) {
|
||||||
|
@ -1258,7 +1258,7 @@ function networkmap_open_graph(
|
||||||
if (isset($map_filter['kval'])) {
|
if (isset($map_filter['kval'])) {
|
||||||
$kval = $map_filter['kval'];
|
$kval = $map_filter['kval'];
|
||||||
} else {
|
} else {
|
||||||
$kval = 0.3;
|
$kval = 0.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// BEWARE: graphwiz DONT use single ('), you need double (")
|
// BEWARE: graphwiz DONT use single ('), you need double (")
|
||||||
|
@ -1653,17 +1653,6 @@ function networkmap_get_new_nodes_from_ip_mask(
|
||||||
$address = [];
|
$address = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($strict_user) {
|
|
||||||
$filter['group_by'] = 'tagente.id_agente';
|
|
||||||
$fields = ['tagente.id_agente'];
|
|
||||||
$acltags = tags_get_user_groups_and_tags($config['id_user'], 'AR', $strict_user);
|
|
||||||
$user_agents = tags_get_all_user_agents(false, $config['id_user'], $acltags, $filter, $fields, false, $strict_user, true);
|
|
||||||
|
|
||||||
foreach ($all_user_agents as $agent) {
|
|
||||||
$user_agents[$agent['id_agente']] = $agent['id_agente'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$agents = [];
|
$agents = [];
|
||||||
foreach ($list_address as $address) {
|
foreach ($list_address as $address) {
|
||||||
foreach ($list_ip_masks as $ip_mask) {
|
foreach ($list_ip_masks as $ip_mask) {
|
||||||
|
@ -1679,25 +1668,13 @@ function networkmap_get_new_nodes_from_ip_mask(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($fields)) {
|
if (empty($fields)) {
|
||||||
if ($strict_user) {
|
|
||||||
if (array_key_exists($id_agent, $user_agents)) {
|
|
||||||
$agents[] = db_get_value_filter('id_agent', 'taddress_agent', ['id_a' => $address['id_a']]);
|
$agents[] = db_get_value_filter('id_agent', 'taddress_agent', ['id_a' => $address['id_a']]);
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$agents[] = db_get_value_filter('id_agent', 'taddress_agent', ['id_a' => $address['id_a']]);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if ($strict_user) {
|
|
||||||
if (array_key_exists($id_agent, $user_agents)) {
|
|
||||||
$agents[] = db_get_row('tagente', 'id_agente', $id_agent, $fields);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$agents[] = db_get_row('tagente', 'id_agente', $id_agent, $fields);
|
$agents[] = db_get_row('tagente', 'id_agente', $id_agent, $fields);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return $agents;
|
return $agents;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ if ($new_networkmap) {
|
||||||
$id_group = 0;
|
$id_group = 0;
|
||||||
$node_radius = 40;
|
$node_radius = 40;
|
||||||
$description = '';
|
$description = '';
|
||||||
$method = 'fdp';
|
$method = 'neato';
|
||||||
$recon_task_id = 0;
|
$recon_task_id = 0;
|
||||||
$source = 'group';
|
$source = 'group';
|
||||||
$ip_mask = '';
|
$ip_mask = '';
|
||||||
|
@ -40,10 +40,10 @@ if ($new_networkmap) {
|
||||||
$offset_x = '';
|
$offset_x = '';
|
||||||
$offset_y = '';
|
$offset_y = '';
|
||||||
$scale_z = 0.5;
|
$scale_z = 0.5;
|
||||||
$node_sep = 0.25;
|
$node_sep = 0.1;
|
||||||
$rank_sep = 1.0;
|
$rank_sep = 1.0;
|
||||||
$mindist = 1.0;
|
$mindist = 1.0;
|
||||||
$kval = 0.3;
|
$kval = 0.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$disabled_generation_method_select = false;
|
$disabled_generation_method_select = false;
|
||||||
|
@ -332,7 +332,7 @@ if ($not_found) {
|
||||||
$method,
|
$method,
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'twopi',
|
'neato',
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
|
|
|
@ -355,6 +355,8 @@ if ($new_networkmap || $save_networkmap) {
|
||||||
$tab = 'r_dinamic';
|
$tab = 'r_dinamic';
|
||||||
define('_activeTab_', 'radial_dynamic');
|
define('_activeTab_', 'radial_dynamic');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header('Location: '.$_SERVER['HTTP_REFERER'].'&tab=view&id_networkmap='.$id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// The networkmap exists
|
// The networkmap exists
|
||||||
|
|
Loading…
Reference in New Issue