diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 5970b24ed2..ed2a2b872a 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2009-12-3 Miguel de Dios + + * godmode/agentes/module_manager_editor_common.php: clean source code. + * include/functions_reporting.php: fix the query to count bad modules for + SLA. + Fixes: 2908101 + 2009-12-3 Miguel de Dios * godmode/reporting/map_builder.php: tiny fix the text for select all diff --git a/pandora_console/godmode/agentes/module_manager_editor_common.php b/pandora_console/godmode/agentes/module_manager_editor_common.php index d72dd5f1fc..4653f8637b 100644 --- a/pandora_console/godmode/agentes/module_manager_editor_common.php +++ b/pandora_console/godmode/agentes/module_manager_editor_common.php @@ -95,6 +95,7 @@ enterprise_include_once('include/functions_policies.php'); $disabledBecauseInPolicy = false; $disabledTextBecauseInPolicy = ''; + if ($config['enterprise_installed'] && ($id_agent_module != 0)) { $disabledBecauseInPolicy = isModuleInPolicy($id_agent_module); if ($disabledBecauseInPolicy) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 50c4c2fa78..30d2fa475f 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -69,10 +69,11 @@ function get_agentmodule_sla ($id_agentmodule, $period = 0, $min_value = 1, $max WHERE id_agente_modulo = %d AND utimestamp > %d AND utimestamp <= %d - AND datos < %d', $id_agentmodule, $datelimit, $date, $min_value); - if ($max_value > $min_value) { - $sql .= sprintf (' AND datos > %d', $max_value); - } + AND ', $id_agentmodule, $datelimit, $date); + if ($max_value > $min_value) + $sql .= sprintf ('( datos < %s OR datos > %d )', $min_value, $max_value); + else + $sql .= sprintf ('datos < %d', $mins_value); $bad = get_db_sql ($sql); if (empty ($bad)) { $bad = 0;