From 86ae300a40925c52c3f82d0e3ae76f2fb95c5b75 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Thu, 14 Nov 2013 10:14:58 +0000 Subject: [PATCH] 2013-11-14 Sergio Martin * godmode/agentes/configurar_agente.php godmode/agentes/module_manager_editor_common.php: Fix module interval updation in software modules. The interval of this kind of modules only can be updated by server when agent reports Interval #379 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9076 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 ++++++++ pandora_console/godmode/agentes/configurar_agente.php | 6 ++++++ .../godmode/agentes/module_manager_editor_common.php | 4 ++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 403be6b687..da076356a3 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2013-11-14 Sergio Martin + + * godmode/agentes/configurar_agente.php + godmode/agentes/module_manager_editor_common.php: Fix module interval + updation in software modules. The interval of this kind of modules + only can be updated by server when agent reports + Interval #379 + 2013-11-13 Miguel de Dios * include/functions_html.php: fixed the checks for duplicate images diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index fa2726e72a..99d71043dc 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -961,6 +961,12 @@ if ($update_module) { 'disabled_types_event' => $disabled_types_event, 'module_macros' => $module_macros); + // In local modules, the interval is updated by agent + $module_kind = (int) get_parameter ('moduletype'); + if ($module_kind == MODULE_DATA) { + unset($values['module_interval']); + } + if ($prediction_module == 3 && $serialize_ops == '') { $result = false; } diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index 35de8b94d8..2d865b3b94 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -111,8 +111,6 @@ if (strstr($page, "policy_modules") === false && $id_agent_module) { $update_module_id = (int) get_parameter_get ('update_module'); -html_print_input_hidden ('moduletype', $moduletype); - $table_simple->id = 'simple'; $table_simple->width = '98%'; $table_simple->class = 'databox_color'; @@ -332,6 +330,8 @@ else { $table_advanced->data[2][1] = html_print_extended_select_for_time ('module_interval' , $interval, '', '', '0', false, true, false, false); } +$table_advanced->data[2][1] .= html_print_input_hidden ('moduletype', $moduletype, true); + $table_advanced->data[2][3] = __('Post process').' ' . ui_print_help_icon ('postprocess', true); $table_advanced->data[2][4] = html_print_input_text ('post_process', $post_process, '', 15, 25, true, $disabledBecauseInPolicy);