mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Fixed open and enterprise network map migration
This commit is contained in:
parent
d8ab1defcb
commit
279b360236
@ -2327,7 +2327,13 @@ function migrate_older_open_maps($id)
|
|||||||
$new_map_filter = [];
|
$new_map_filter = [];
|
||||||
$new_map_filter['dont_show_subgroups'] = $old_networkmap['dont_show_subgroups'];
|
$new_map_filter['dont_show_subgroups'] = $old_networkmap['dont_show_subgroups'];
|
||||||
$new_map_filter['node_radius'] = 40;
|
$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['filter'] = json_encode($new_map_filter);
|
||||||
|
|
||||||
$map_values['description'] = 'Mapa open migrado';
|
$map_values['description'] = 'Mapa open migrado';
|
||||||
@ -2340,11 +2346,7 @@ function migrate_older_open_maps($id)
|
|||||||
$map_values['source_period'] = 60;
|
$map_values['source_period'] = 60;
|
||||||
$map_values['source'] = 0;
|
$map_values['source'] = 0;
|
||||||
$map_values['source_data'] = $old_networkmap['id_group'];
|
$map_values['source_data'] = $old_networkmap['id_group'];
|
||||||
if ($old_networkmap['type'] == 'radial_dinamic') {
|
$map_values['generation_method'] = 3;
|
||||||
$map_values['generation_method'] = 6;
|
|
||||||
} else {
|
|
||||||
$map_values['generation_method'] = 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
$map_values['generated'] = 0;
|
$map_values['generated'] = 0;
|
||||||
|
|
||||||
|
@ -702,22 +702,6 @@ if (is_ajax()) {
|
|||||||
if (!$return) {
|
if (!$return) {
|
||||||
$return_data['ent'] = false;
|
$return_data['ent'] = false;
|
||||||
break;
|
break;
|
||||||
} else {
|
|
||||||
$old_networkmap_ent = db_get_row_filter(
|
|
||||||
'tnetworkmap_enterprise',
|
|
||||||
['id' => $id_ent_map]
|
|
||||||
);
|
|
||||||
|
|
||||||
$options = json_decode($old_networkmap_ent, true);
|
|
||||||
$options['migrated'] = 'migrated';
|
|
||||||
|
|
||||||
$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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -732,14 +716,6 @@ if (is_ajax()) {
|
|||||||
if (!$return) {
|
if (!$return) {
|
||||||
$return_data['open'] = false;
|
$return_data['open'] = false;
|
||||||
break;
|
break;
|
||||||
} 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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user