diff --git a/pandora_console/include/functions_maps.php b/pandora_console/include/functions_maps.php index 8379c49b37..af7715fa4f 100644 --- a/pandora_console/include/functions_maps.php +++ b/pandora_console/include/functions_maps.php @@ -87,7 +87,7 @@ function maps_duplicate_items_map($id, $map_items) { 'options' => $item['options'], 'style' => $item['style']); $result_copy_item = db_process_sql_insert('titem', $copy_items); if ($result_copy_item) { - $item_relations = db_get_all_rows_sql("SELECT * FROM trel_item WHERE id = " . $item['id']); + $item_relations = db_get_all_rows_sql("SELECT * FROM trel_item WHERE id = " . $item['id'] . " AND deleted = 0"); if ($item['id'] == $item_relations['parent_id']) { $copy_item_relations = array( 'id_parent' => $result_copy_item, diff --git a/pandora_console/include/javascript/functions_pandora_networkmap.js b/pandora_console/include/javascript/functions_pandora_networkmap.js index 2aca44e8ff..53125908ca 100644 --- a/pandora_console/include/javascript/functions_pandora_networkmap.js +++ b/pandora_console/include/javascript/functions_pandora_networkmap.js @@ -582,10 +582,16 @@ function update_link(row_index, id_link) { delete_link_from_id(index); var temp_link = {}; + temp_link["status_start"] = "0"; + temp_link["status_end"] = "0"; + temp_link["id_db"] = String(data['id_db_link']); + if (data['type_source'] == 1) { temp_link["arrow_start"] = "module"; temp_link["id_module_start"] = interface_source; + temp_link["status_start"] = data['status']; + temp_link["link_color"] = (data['status'] == "1") ? "#FC4444" : "#999"; } else { temp_link["arrow_start"] = ""; @@ -595,15 +601,15 @@ function update_link(row_index, id_link) { if (data['type_target'] == 1) { temp_link["arrow_end"] = "module"; temp_link["id_module_end"] = interface_target; + temp_link["status_end"] = data['status']; + temp_link["link_color"] = (data['status'] == "1") ? "#FC4444" : "#999"; } else { temp_link["arrow_end"] = ""; temp_link["id_agent_end"] = interface_target; temp_link["id_module_end"] = 0; } - temp_link["status_start"] = "0"; - temp_link["status_end"] = "0"; - + temp_link["text_start"] = data["text_start"]; temp_link["text_end"] = data["text_end"];