diff --git a/pandora_console/include/class/NetworkMap.class.php b/pandora_console/include/class/NetworkMap.class.php index fb17914079..942f338a0d 100644 --- a/pandora_console/include/class/NetworkMap.class.php +++ b/pandora_console/include/class/NetworkMap.class.php @@ -3043,6 +3043,7 @@ class NetworkMap $table->data = []; $table->rowstyle['template_row'] = 'display: none;'; $table->data['template_row']['node_source'] = ''; + // Inputs must be not select2, cause duplication make issues. $table->data['template_row']['interface_source'] = html_print_select( [], 'interface_source', @@ -3050,7 +3051,21 @@ class NetworkMap '', __('None'), 0, - true + true, + false, + true, + '', + false, + false, + false, + false, + false, + '', + false, + false, + false, + false, + false ); $table->data['template_row']['interface_target'] = html_print_select( [], @@ -3059,7 +3074,21 @@ class NetworkMap '', __('None'), 0, - true + true, + false, + true, + '', + false, + false, + false, + false, + false, + '', + false, + false, + false, + false, + false ); $table->data['template_row']['node_target'] = ''; diff --git a/pandora_console/include/javascript/functions_pandora_networkmap.js b/pandora_console/include/javascript/functions_pandora_networkmap.js index 0d440d3048..0568752f63 100644 --- a/pandora_console/include/javascript/functions_pandora_networkmap.js +++ b/pandora_console/include/javascript/functions_pandora_networkmap.js @@ -965,8 +965,7 @@ function load_interfaces(selected_links) { $("#relations_table-no_relations").css("display", "none"); $("#relations_table-loading").css("display", ""); - var template_relation_row = $("#relations_table-template_row"); - template_relation_row.clone(); + var template_relation_row = $("#relations_table-template_row").clone; $(template_relation_row).css("display", ""); $(template_relation_row).attr("class", "relation_link_row"); @@ -1114,6 +1113,10 @@ function load_interfaces(selected_links) { ); $("#relations_table tbody").append(template_relation_row); + // Update input for transform in select2. + $("#interface_source_" + i).select2(); + $("#interface_target_" + i).select2(); + template_relation_row = null; }); }