2014-03-13 Sergio Martin <sergio.martin@artica.es>

* include/functions_visual_map.php
	include/ajax/visual_console_builder.ajax.php: Fix wrong
	alerts status in warning without alerts elements. Fix alerts 
	status broken by miguel in previous commits to fix ajax load,



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9587 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2014-03-13 16:58:18 +00:00
parent c0075cad39
commit a4b0566342
3 changed files with 13 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2014-03-13 Sergio Martin <sergio.martin@artica.es>
* include/functions_visual_map.php
include/ajax/visual_console_builder.ajax.php: Fix wrong
alerts status in warning without alerts elements. Fix alerts
status broken by miguel in previous commits to fix ajax load,
2014-03-13 Ramon Novoa <rnovoa@artica.es>
* include/functions_netflow.php: Improved version detection. Some distros

View File

@ -285,6 +285,9 @@ switch ($action) {
$return = array();
$return['image'] = visual_map_get_image_status_element($layoutData);
if (substr($return['image'],0,1) == '4') {
$return['image'] = substr_replace($return['image'], '', 0,1);
}
echo json_encode($return);
break;

View File

@ -778,7 +778,7 @@ function visual_map_get_image_status_element($layoutData) {
break;
case 4:
//Critical (ALERT)
$img = $img . "_bad.png";
$img = "4" . $img . "_bad.png";
break;
case 0:
//Normal (OK)
@ -790,7 +790,7 @@ function visual_map_get_image_status_element($layoutData) {
break;
case 10:
//Warning (ALERT)
$img = $img . "_warning.png";
$img = "4" . $img . "_warning.png";
break;
case 3:
//Unknown
@ -848,12 +848,7 @@ function visual_map_get_status_element($layoutData) {
$status = modules_get_agentmodule_status ($layoutData['id_agente_modulo']);
//We need to get the diference between warning and critical alerts!!!
$real_status = db_get_row ("tagente_estado", "id_agente_modulo", $layoutData["id_agente_modulo"]);
if ($real_status['estado'] == 2) {
//This module has an alert fired and warning status
$status = VISUAL_MAP_STATUS_WARNING_ALERT;
}
$real_status = db_get_row ("tagente_estado", "id_agente_modulo", $layoutData["id_agente_modulo"]);
//Status for a whole agent, if agente_modulo was == 0
}