diff --git a/pandora_console/include/functions_networkmap.php b/pandora_console/include/functions_networkmap.php index e4fb19e814..dda25538ee 100644 --- a/pandora_console/include/functions_networkmap.php +++ b/pandora_console/include/functions_networkmap.php @@ -2327,7 +2327,13 @@ function migrate_older_open_maps($id) $new_map_filter = []; $new_map_filter['dont_show_subgroups'] = $old_networkmap['dont_show_subgroups']; $new_map_filter['node_radius'] = 40; - $new_map_filter['id_migrate_map'] = $id; + $new_map_filter['x_offs'] = 0; + $new_map_filter['y_offs'] = 0; + $new_map_filter['z_dash'] = '0.5'; + $new_map_filter['node_sep'] = '0.1'; + $new_map_filter['rank_sep'] = 1; + $new_map_filter['mindist'] = 1; + $new_map_filter['kval'] = '0.1'; $map_values['filter'] = json_encode($new_map_filter); $map_values['description'] = 'Mapa open migrado'; @@ -2340,11 +2346,7 @@ function migrate_older_open_maps($id) $map_values['source_period'] = 60; $map_values['source'] = 0; $map_values['source_data'] = $old_networkmap['id_group']; - if ($old_networkmap['type'] == 'radial_dinamic') { - $map_values['generation_method'] = 6; - } else { - $map_values['generation_method'] = 4; - } + $map_values['generation_method'] = 3; $map_values['generated'] = 0; diff --git a/pandora_console/operation/agentes/pandora_networkmap.view.php b/pandora_console/operation/agentes/pandora_networkmap.view.php index 77f3d2c8a5..2ee34806d9 100644 --- a/pandora_console/operation/agentes/pandora_networkmap.view.php +++ b/pandora_console/operation/agentes/pandora_networkmap.view.php @@ -713,11 +713,7 @@ if (is_ajax()) { $values['options'] = json_encode($options); - $return_update = db_process_sql_update('tnetworkmap_enterprise', $values, ['id' => $id_ent_map]); - if (!$return_update) { - $return_data['ent'] = false; - break; - } + db_process_sql_update('tnetworkmap_enterprise', $values, ['id' => $id_ent_map]); } } } @@ -735,11 +731,7 @@ if (is_ajax()) { } else { $values['text_filter'] = 'migrated'; - $return_update = db_process_sql_update('tnetwork_map', $values, ['id_networkmap' => $id_open_map]); - if (!$return_update) { - $return_data['open'] = false; - break; - } + db_process_sql_update('tnetwork_map', $values, ['id_networkmap' => $id_open_map]); } } }