diff --git a/pandora_console/godmode/agentes/inventory_manager.php b/pandora_console/godmode/agentes/inventory_manager.php index 77feece220..0a4e84bae5 100644 --- a/pandora_console/godmode/agentes/inventory_manager.php +++ b/pandora_console/godmode/agentes/inventory_manager.php @@ -75,7 +75,7 @@ if ($add_inventory_module) { 'interval' => $interval, 'username' => $username, 'password' => $password, - 'custom_fields' => $custom_fields_enabled && !empty($custom_fields) ? base64_encode(json_encode($custom_fields)) : '', + 'custom_fields' => $custom_fields_enabled && !empty($custom_fields) ? base64_encode(json_encode(io_safe_output($custom_fields))) : '', ]; $result = db_process_sql_insert('tagent_module_inventory', $values); @@ -119,7 +119,7 @@ if ($add_inventory_module) { 'interval' => $interval, 'username' => $username, 'password' => $password, - 'custom_fields' => $custom_fields_enabled && !empty($custom_fields) ? base64_encode(json_encode($custom_fields)) : '', + 'custom_fields' => $custom_fields_enabled && !empty($custom_fields) ? base64_encode(json_encode(io_safe_output($custom_fields))) : '', ]; $result = db_process_sql_update('tagent_module_inventory', $values, ['id_agent_module_inventory' => $id_agent_module_inventory, 'id_agente' => $id_agente]); diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 11670b33f6..767cba430f 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -7559,7 +7559,7 @@ function ui_get_inventory_module_add_form( 'border' => '0', 'title' => __('Remove'), 'style' => 'cursor: pointer;', - 'class' => 'remove-custom-field invert_filter', + 'class' => 'remove-custom-field invert_filter main_menu_icon', ] ); @@ -7593,9 +7593,13 @@ function ui_get_inventory_module_add_form( 'custom_fields['.$i.'][value]', $field['value'], '', - 25, + false, 40, - true + true, + false, + false, + '', + 'w90p' ); } @@ -7607,7 +7611,7 @@ function ui_get_inventory_module_add_form( 'border' => '0', 'title' => __('Remove'), 'style' => 'cursor: pointer;', - 'class' => 'remove-custom-field invert_filter', + 'class' => 'remove-custom-field invert_filter main_menu_icon', ] ); @@ -7670,10 +7674,12 @@ function ui_get_inventory_module_add_form( $("#inventory-module-form-userpass-row").hide(); $("#inventory-module-form-custom-fields-row").show(); $("tr[id^=inventory-module-form-custom-field-row-]").show(); + $('#inventory-module-form-custom-fields-button').show(); } else { $("#inventory-module-form-userpass-row").show(); $("#inventory-module-form-custom-fields-row").hide(); $("tr[id^=inventory-module-form-custom-field-row-]").hide(); + $('#inventory-module-form-custom-fields-button').hide(); } }