Merge branch 'ent-4684-migracion-de-mapas-open-y-enterprise-de-v6-a-v7' into 'develop'
Fixed open and enterprise network map migration See merge request artica/pandorafms!2745
This commit is contained in:
commit
b6db2aa041
|
@ -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;
|
||||
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue