2010-05-04 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_reporting.php: fixed the php notice message when the
	index not exist in the var $data in the function "get_agentmodule_sla".



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2667 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-05-04 17:05:25 +00:00
parent fd8f284aab
commit df5c43ca8f
2 changed files with 14 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2010-05-04 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: fixed the php notice message when the
index not exist in the var $data in the function "get_agentmodule_sla".
2010-05-04 Sergio Martin <sergio.martin@artica.es> 2010-05-04 Sergio Martin <sergio.martin@artica.es>
* godmode/agentes/agent_template.php: Fixed the * godmode/agentes/agent_template.php: Fixed the

View File

@ -294,12 +294,15 @@ function get_agentmodule_sla ($id_agentmodule, $period = 0, $min_value = 1, $max
$bad_period += $data['utimestamp'] - $previous_utimestamp; $bad_period += $data['utimestamp'] - $previous_utimestamp;
} }
// Re-calculate previous status for the next data if (array_key_exists('datos', $data)) {
if ((($max_value > $min_value AND ($data['datos'] > $max_value OR $data['datos'] < $min_value))) OR // Re-calculate previous status for the next data
($max_value <= $min_value AND $data['datos'] < $min_value)) { if ((($max_value > $min_value AND ($data['datos'] > $max_value OR $data['datos'] < $min_value))) OR
$previous_status = 1; ($max_value <= $min_value AND $data['datos'] < $min_value)) {
} else { $previous_status = 1;
$previous_status = 0; }
else {
$previous_status = 0;
}
} }
$previous_utimestamp = $data['utimestamp']; $previous_utimestamp = $data['utimestamp'];