mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Merge branch '2432-Edición-módulos-snmpv3-en-operaciones-masivas-dev' into 'develop'
Fixed edit snmp modules in bulk See merge request artica/pandorafms!1642
This commit is contained in:
commit
44411c4628
@ -650,25 +650,25 @@ $table->data['edit16'][1] = html_print_input_text ('max_retries', '', '', 5, 10,
|
||||
__('Number of retries that the module will attempt to run.'), true);
|
||||
|
||||
$table->data['edit22'][0] = __('Web checks').ui_print_help_icon ("web_checks", true);;
|
||||
$table->data['edit22'][1] = '<textarea id="textarea_plugin_parameter" name="plugin_parameter" cols="65" rows="15"></textarea>';
|
||||
$table->data['edit22'][1] = '<textarea id="textarea_plugin_parameter" name="plugin_parameter_text" cols="65" rows="15"></textarea>';
|
||||
|
||||
$table->data['edit16'][2] = __('Port');
|
||||
$table->data['edit16'][3] = html_print_input_text ('tcp_port', '', '', 5, 20, true);
|
||||
|
||||
$table->data['edit17'][0] = __('TCP send') . ' ' . ui_print_help_icon ("tcp_send", true);
|
||||
$table->data['edit17'][1] = html_print_textarea ('tcp_send', 2, 65, '', '', true);
|
||||
$table->data['edit17'][1] = html_print_textarea ('tcp_send2', 2, 65, '', '', true);
|
||||
|
||||
$table->data['edit17'][2] = __('TCP receive');
|
||||
$table->data['edit17'][3] = html_print_textarea ('tcp_rcv', 2, 65, '', '', true);
|
||||
|
||||
$table->data['edit18'][0] = __('WMI query') . ui_print_help_icon ('wmiquery', true);
|
||||
$table->data['edit18'][1] = html_print_input_text ('snmp_oid', '', '', 35, 255, true);
|
||||
$table->data['edit18'][1] = html_print_input_text ('wmi_query', '', '', 35, 255, true);
|
||||
|
||||
$table->data['edit18'][2] = __('Key string');
|
||||
$table->data['edit18'][3] = html_print_input_text ('snmp_community', '', '', 20, 60, true);
|
||||
$table->data['edit18'][3] = html_print_input_text ('key_string', '', '', 20, 60, true);
|
||||
|
||||
$table->data['edit19'][0] = __('Field number') . ui_print_help_icon ('wmifield', true);
|
||||
$table->data['edit19'][1] = html_print_input_text ('tcp_port', '', '', 5, 15, true);
|
||||
$table->data['edit19'][1] = html_print_input_text ('field_number', '', '', 5, 15, true);
|
||||
|
||||
$table->data['edit20'][0] = __('Plugin') . ui_print_help_icon ('plugin_macros', true);
|
||||
$table->data['edit20'][1] = html_print_select_from_sql ('SELECT id, name FROM tplugin ORDER BY name',
|
||||
@ -1381,7 +1381,8 @@ function process_manage_edit ($module_name, $agents_select = null, $module_statu
|
||||
'id_category', 'disabled_types_event', 'ip_target', "custom_ip_target",
|
||||
'descripcion', 'min_ff_event_normal', 'min_ff_event_warning',
|
||||
'min_ff_event_critical', 'each_ff', 'module_ff_interval',
|
||||
'ff_timeout', 'max_timeout','tcp_port','max_retries','tcp_rcv','id_plugin');
|
||||
'ff_timeout', 'max_timeout','tcp_port','max_retries','tcp_rcv','id_plugin',
|
||||
'wmi_query','key_string','field_number','tcp_send2','plugin_parameter_text');
|
||||
$values = array ();
|
||||
|
||||
foreach ($fields as $field) {
|
||||
@ -1433,19 +1434,13 @@ function process_manage_edit ($module_name, $agents_select = null, $module_statu
|
||||
else{
|
||||
$values['macros'] .= '}';
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
$values['macros'] .= '}';
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case 'module_interval':
|
||||
if ($value != 0) {
|
||||
$values[$field] = $value;
|
||||
@ -1470,6 +1465,32 @@ function process_manage_edit ($module_name, $agents_select = null, $module_statu
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'wmi_query':
|
||||
if ($value != '') {
|
||||
$values['snmp_oid'] = $value;
|
||||
}
|
||||
break;
|
||||
case 'key_string':
|
||||
if ($value != '') {
|
||||
$values['snmp_community'] = $value;
|
||||
}
|
||||
break;
|
||||
case 'field_number':
|
||||
if ($value != '') {
|
||||
$values['tcp_port'] = $value;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'tcp_send2':
|
||||
if ($value != '') {
|
||||
$values['tcp_send'] = $value;
|
||||
}
|
||||
break;
|
||||
case 'plugin_parameter_text':
|
||||
if ($value != '') {
|
||||
$values['plugin_parameter'] = $value;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if ($value != '') {
|
||||
$values[$field] = $value;
|
||||
|
Loading…
x
Reference in New Issue
Block a user