Merge branch '1890-Operaciones-masivas-de-modulo-error-al-cambiar-unidad-dev' into 'develop'

Fixed unit in bulk operations

See merge request artica/pandorafms!1300
This commit is contained in:
vgilc 2018-02-26 10:18:11 +01:00
commit b630eea754
1 changed files with 8 additions and 6 deletions

View File

@ -568,7 +568,7 @@ foreach ($targets2 as $t) {
$table->data['edit6'][1] = html_print_select ($targets, 'id_export', '','', __('No change'), '', true, false, false);
$table->data['edit6'][2] = __('Unit');
$table->data['edit6'][3] = html_print_extended_select_for_unit('unit','', '', '', '0', '15', true, false, false);
$table->data['edit6'][3] = html_print_extended_select_for_unit('unit','-1', '', '', '0', '15', true, false, false, false , 1);
/* FF stands for Flip-flop */
@ -1221,7 +1221,7 @@ function process_manage_edit ($module_name, $agents_select = null, $module_statu
/* List of fields which can be updated */
$fields = array ('dynamic_interval', 'dynamic_max', 'dynamic_min', 'dynamic_two_tailed', 'min_warning', 'max_warning', 'str_warning',
'min_critical', 'max_critical', 'str_critical', 'min_ff_event',
'module_interval', 'disabled', 'post_process', 'unit',
'module_interval', 'disabled', 'post_process', 'unit_select',
'snmp_community','snmp_oid','tcp_send', 'custom_string_1',
'plugin_parameter', 'custom_string_2', 'custom_string_3', 'min',
'max', 'id_module_group', 'plugin_user', 'plugin_pass',
@ -1254,10 +1254,12 @@ function process_manage_edit ($module_name, $agents_select = null, $module_statu
}
break;
case 'unit_select':
if($value == "none"){
$values['unit'] = (string) get_parameter('unit_text');
} else {
$values['unit'] = $value;
if($value != -1){
if($value == "none"){
$values['unit'] = (string) get_parameter('unit_text');
} else {
$values['unit'] = $value;
}
}
break;
default: