diff --git a/pandora_console/godmode/agentes/module_manager_editor.php b/pandora_console/godmode/agentes/module_manager_editor.php index 9d49bb0a96..cee4825faa 100644 --- a/pandora_console/godmode/agentes/module_manager_editor.php +++ b/pandora_console/godmode/agentes/module_manager_editor.php @@ -591,7 +591,7 @@ ui_toggle( ); ui_toggle( html_print_table($table_macros, true), - __('Custom macros').ui_print_help_icon('module_macros', true) + __('Custom macros') ); if ($moduletype != 13) { diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index 1724ee6622..2adab81340 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -159,6 +159,7 @@ if ($disabledBecauseInPolicy) { } $update_module_id = (int) get_parameter_get('update_module'); +$edit_module = (bool) get_parameter_get('edit_module'); $table_simple = new stdClass(); $table_simple->id = 'simple'; $table_simple->width = '100%'; @@ -270,7 +271,7 @@ if (!$in_policy) { } } -$table_simple->data[2][0] = __('Type').' '.ui_print_help_icon('module_type', true); +$table_simple->data[2][0] = __('Type').' '.ui_print_help_icon($help_type, true, '', 'images/help_green.png', '', 'module_type_help'); $table_simple->data[2][0] .= html_print_input_hidden('id_module_type_hidden', $id_module_type, true); if (isset($id_agent_module)) { @@ -350,6 +351,35 @@ if (!$edit) { $table_simple->data[2][1] .= html_print_input_hidden('type_names', base64_encode(io_json_mb_encode($type_names_hash)), true); } +if ($edit_module) { + $id_module_type = (int) $id_module_type; + if (($id_module_type >= 1 && $id_module_type <= 5) + || ($id_module_type >= 21 && $id_module_type <= 23) + || ($id_module_type == 100) + ) { + $help_header = 'local_module'; + } + + if ($id_module_type === 6 || $id_module_type === 7 + ) { + $help_header = 'icmp_module_tab'; + } + + if ($id_module_type >= 15 && $id_module_type <= 18) { + $help_header = 'snmp_module_tab'; + } + + if ($id_module_type >= 8 && $id_module_type <= 11) { + $help_header = 'tcp_module_tab'; + } + + if ($id_module_type >= 30 && $id_module_type <= 33) { + $help_header = 'webserver_module_tab'; + } + + $table_simple->data[2][0] = __('Type').' '.ui_print_help_icon($help_header, true); +} + if ($disabledBecauseInPolicy) { $table_simple->data[2][3] .= html_print_input_hidden('id_module_group', $id_module_group, true); } @@ -1223,7 +1253,124 @@ $(document).ready (function () { var type_names = jQuery.parseJSON(Base64.decode($('#hidden-type_names').val())); var type_name_selected = type_names[type_selected]; - + var element = document.getElementById("module_type_help"); + var language = "" ; + element.onclick = function (event) { + if(type_name_selected == 'async_data' || + type_name_selected == 'async_proc' || + type_name_selected == 'async_string' || + type_name_selected == 'generic_proc'|| + type_name_selected == 'generic_data' || + type_name_selected == 'generic_data_inc' || + type_name_selected == 'generic_data_inc_abs'|| + type_name_selected == 'generic_data_string' || + type_name_selected == 'keep_alive' + ){ + if (language == 'es'){ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Operacion&printable=yes#Tipos_de_m.C3.B3dulos', + '_blank', + "width=800,height=400" + ); + } + else{ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Operations&printable=yes#Types_of_Modules', + '_blank', + "width=800,height=400" + ); + } + + + } + if(type_name_selected == 'remote_icmp' || + type_name_selected == 'remote_icmp_proc' + ){ + if(language == 'es'){ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_ICMP', + '_blank', + "width=800,height=400" + ); + } + else{ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#ICMP_Monitoring', + '_blank', + "width=800,height=400" + ); + } + + + } + if(type_name_selected == 'remote_snmp_string' || + type_name_selected == 'remote_snmp_proc' || + type_name_selected == 'remote_snmp_inc' || + type_name_selected == 'remote_snmp' + ){ + if(language == 'es'){ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizando_con_m.C3.B3dulos_de_red_tipo_SNMP', + '_blank', + "width=800,height=400" + ); + } + else{ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#Monitoring_by_Network_Modules_with_SNMP', + '_blank', + "width=800,height=400" + ); + } + + + } + if(type_name_selected == 'remote_tcp_string' || + type_name_selected == 'remote_tcp_proc' || + type_name_selected == 'remote_tcp_inc' || + type_name_selected == 'remote_tcp' + ){ + if(language == 'es'){ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_remota&printable=yes#Monitorizaci.C3.B3n_TCP', + '_blank', + "width=800,height=400" + ); + } + else{ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Remote_Monitoring&printable=yes#TCP_Monitoring', + '_blank', + "width=800,height=400" + ); + } + + + } + if(type_name_selected == 'web_data' || + type_name_selected == 'web_proc' || + type_name_selected == 'web_content_data' || + type_name_selected == 'web_content_string' + ){ + if(language == 'es'){ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Monitorizacion_web&printable=yes#Creaci.C3.B3n_de_m.C3.B3dulos_web', + '_blank', + "width=800,height=400" + ); + } + else{ + window.open( + 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Web_Monitoring&printable=yes#Creating_Web_Modules', + '_blank', + "width=800,height=400" + ); + } + + + } + } + if (type_name_selected.match(/_string$/) == null) { // Numeric types $('#string_critical').hide(); diff --git a/pandora_console/godmode/agentes/module_manager_editor_wmi.php b/pandora_console/godmode/agentes/module_manager_editor_wmi.php index d15cd6477f..5c89c11d9e 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_wmi.php +++ b/pandora_console/godmode/agentes/module_manager_editor_wmi.php @@ -42,7 +42,7 @@ if (empty($update_module_id)) { } $data = []; -$data[0] = __('Target IP'); +$data[0] = __('Target IP').' '.ui_print_help_icon('wmi_module_tab', true); $data[1] = html_print_input_text('ip_target', $ip_target, '', 15, 60, true); $data[2] = __('Namespace').ui_print_help_tip(__('Optional. WMI namespace. If unsure leave blank.'), true); $data[3] = html_print_input_text( diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 85b5ee128d..1c2d26006a 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -743,7 +743,7 @@ $class = 'databox filters';