2009-12-3 Miguel de Dios <miguel.dedios@artica.es>

* 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



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2153 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2009-12-03 15:40:49 +00:00
parent 438ba79ed1
commit 69eba916b2
3 changed files with 13 additions and 4 deletions

View File

@ -1,3 +1,10 @@
2009-12-3 Miguel de Dios <miguel.dedios@artica.es>
* 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 <miguel.dedios@artica.es>
* godmode/reporting/map_builder.php: tiny fix the text for select all

View File

@ -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)

View File

@ -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;