diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 57ab893a17..a5e7636c0d 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2011-04-14 Javier Lanz + + * godmode/massive/massive_edit_modules.php: Added functionality to edit + SNMP version on massive operations + 2011-04-14 Miguel de Dios * include/graphs/functions_pchart.php: added method to force height or not, diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php index d0b20a8b32..e483cfe9c2 100644 --- a/pandora_console/godmode/massive/massive_edit_modules.php +++ b/pandora_console/godmode/massive/massive_edit_modules.php @@ -32,8 +32,8 @@ function process_manage_edit ($module_name, $agents_select = null) { } /* List of fields which can be updated */ - $fields = array ('min_warning', 'max_warning', 'min_critical', 'max_critical', 'min_ff_event','module_interval', - 'disabled','post_process','snmp_community','min','max','id_module_group', 'plugin_user', 'plugin_pass', 'id_export', 'history_data'); + $fields = array ('min_warning', 'max_warning', 'min_critical', 'max_critical', 'min_ff_event', 'module_interval', + 'disabled', 'post_process', 'snmp_community', 'tcp_send', 'min', 'max', 'id_module_group', 'plugin_user', 'plugin_pass', 'id_export', 'history_data'); $values = array (); foreach ($fields as $field) { $value = get_parameter ($field, ''); @@ -196,6 +196,7 @@ if (! $module_type) { $table->rowstyle['edit1'] = 'display: none'; $table->rowstyle['edit2'] = 'display: none'; $table->rowstyle['edit3'] = 'display: none'; + $table->rowstyle['edit35'] = 'display: none'; $table->rowstyle['edit4'] = 'display: none'; $table->rowstyle['edit5'] = 'display: none'; $table->rowstyle['edit6'] = 'display: none'; @@ -218,6 +219,11 @@ foreach ($module_types as $type) { $types[$type['id_tipo']] = $type['description']; } +$snmp_versions['1'] = 'v. 1'; +$snmp_versions['2'] = 'v. 2'; +$snmp_versions['2c'] = 'v. 2c'; +$snmp_versions['3'] = 'v. 3'; + $table->data = array (); $table->data[0][0] = __('Selection mode'); @@ -302,6 +308,10 @@ $table->data['edit3'][0] = __('Post process'); $table->data['edit3'][1] = print_input_text ('post_process', '', '', 10, 15, true); $table->data['edit3'][2] = __('SMNP community'); $table->data['edit3'][3] = print_input_text ('snmp_community', '', '', 10, 15, true); +$table->data['edit35'][0] = ''; +$table->data['edit35'][1] = ''; +$table->data['edit35'][2] = __('SNMP version'); +$table->data['edit35'][3] = print_select ($snmp_versions, 'tcp_send', '', '', __('Select'), '', true, false, false, ''); $table->data['edit4'][0] = __('Value'); $table->data['edit4'][1] = ''.__('Min.').''; @@ -377,7 +387,7 @@ $(document).ready (function () { $(".select_modules_row_2").css('display', ''); } - $("tr#delete_table-edit1, tr#delete_table-edit2, tr#delete_table-edit3, tr#delete_table-edit4, tr#delete_table-edit5, tr#delete_table-edit6, tr#delete_table-edit7").hide (); + $("tr#delete_table-edit1, tr#delete_table-edit2, tr#delete_table-edit3, tr#delete_table-edit35, tr#delete_table-edit4, tr#delete_table-edit5, tr#delete_table-edit6, tr#delete_table-edit7").hide (); if (this.value == '0') { filter = ''; @@ -412,7 +422,7 @@ $(document).ready (function () { $("td#delete_table-0-1, td#delete_table-edit1-1, td#delete_table-edit2-1").css ("width", "35%"); $("#form_edit input[type=text]").attr ("value", ""); $("#form_edit input[type=checkbox]").removeAttr ("checked"); - $("tr#delete_table-edit1, tr#delete_table-edit2, tr#delete_table-edit3, tr#delete_table-edit4, tr#delete_table-edit5, tr#delete_table-edit6, tr#delete_table-edit7").show (); + $("tr#delete_table-edit1, tr#delete_table-edit2, tr#delete_table-edit3, tr#delete_table-edit35, tr#delete_table-edit4, tr#delete_table-edit5, tr#delete_table-edit6, tr#delete_table-edit7").show (); } function clean_lists() { @@ -420,7 +430,7 @@ $(document).ready (function () { $("#module_name").html(''); $("#agents").html(''); $("#module").html(''); - $("tr#delete_table-edit1, tr#delete_table-edit2, tr#delete_table-edit3, tr#delete_table-edit4, tr#delete_table-edit5, tr#delete_table-edit6, tr#delete_table-edit7").hide (); + $("tr#delete_table-edit1, tr#delete_table-edit2, tr#delete_table-edit3, tr#delete_table-edit35, tr#delete_table-edit4, tr#delete_table-edit5, tr#delete_table-edit6, tr#delete_table-edit7").hide (); $('input[type=checkbox]').attr('checked', false); $('input[type=checkbox]').attr('disabled', true); $('#module_type').val(-1); @@ -432,24 +442,24 @@ $(document).ready (function () { if(this.id == "checkbox-force_type"){ if(this.checked) { $(".select_modules_row_2").css('display', 'none'); - $("tr#delete_table-edit1, tr#delete_table-edit2, tr#delete_table-edit3, tr#delete_table-edit4, tr#delete_table-edit5, tr#delete_table-edit6, tr#delete_table-edit7").show (); + $("tr#delete_table-edit1, tr#delete_table-edit2, tr#delete_table-edit3, tr#delete_table-edit35, tr#delete_table-edit4, tr#delete_table-edit5, tr#delete_table-edit6, tr#delete_table-edit7").show (); } else { $(".select_modules_row_2").css('display', ''); if($('#module_name option:selected').val() == undefined) { - $("tr#delete_table-edit1, tr#delete_table-edit2, tr#delete_table-edit3, tr#delete_table-edit4, tr#delete_table-edit5, tr#delete_table-edit6, tr#delete_table-edit7").hide (); + $("tr#delete_table-edit1, tr#delete_table-edit2, tr#delete_table-edit3, tr#delete_table-edit35, tr#delete_table-edit4, tr#delete_table-edit5, tr#delete_table-edit6, tr#delete_table-edit7").hide (); } } } else { if(this.checked) { $(".select_agents_row_2").css('display', 'none'); - $("tr#delete_table-edit1, tr#delete_table-edit2, tr#delete_table-edit3, tr#delete_table-edit4, tr#delete_table-edit5, tr#delete_table-edit6, tr#delete_table-edit7").show (); + $("tr#delete_table-edit1, tr#delete_table-edit2, tr#delete_table-edit3, tr#delete_table-edit35, tr#delete_table-edit4, tr#delete_table-edit5, tr#delete_table-edit6, tr#delete_table-edit7").show (); } else { $(".select_agents_row_2").css('display', ''); if($('#id_agents option:selected').val() == undefined) { - $("tr#delete_table-edit1, tr#delete_table-edit2, tr#delete_table-edit3, tr#delete_table-edit4, tr#delete_table-edit5, tr#delete_table-edit6, tr#delete_table-edit7").hide (); + $("tr#delete_table-edit1, tr#delete_table-edit2, tr#delete_table-edit3, tr#delete_table-edit35, tr#delete_table-edit4, tr#delete_table-edit5, tr#delete_table-edit6, tr#delete_table-edit7").hide (); } } } @@ -487,7 +497,7 @@ $(document).ready (function () { $(".select_agents_row_2").css('display', ''); } - $("tr#delete_table-edit1, tr#delete_table-edit2, tr#delete_table-edit3, tr#delete_table-edit4, tr#delete_table-edit5, tr#delete_table-edit6, tr#delete_table-edit7").hide (); + $("tr#delete_table-edit1, tr#delete_table-edit2, tr#delete_table-edit3, tr#delete_table-edit35, tr#delete_table-edit4, tr#delete_table-edit5, tr#delete_table-edit6, tr#delete_table-edit7").hide (); jQuery.post ("ajax.php", {"page" : "operation/agentes/ver_agente",