2013-07-16 Miguel de Dios <miguel.dedios@artica.es>

* include/graphs/flot/pandora.flot.js,
	include/functions_networkmap.php, include/constants.php,
	include/ajax/agent.php, include/ajax/events.php: improve the
	source code and remove the magic number and they changed for
	constants.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8527 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-07-16 09:09:50 +00:00
parent c025c94965
commit 3eed1ff8be
6 changed files with 69 additions and 59 deletions

View File

@ -1,3 +1,11 @@
2013-07-16 Miguel de Dios <miguel.dedios@artica.es>
* include/graphs/flot/pandora.flot.js,
include/functions_networkmap.php, include/constants.php,
include/ajax/agent.php, include/ajax/events.php: improve the
source code and remove the magic number and they changed for
constants.
2013-07-15 Sergio Martin <sergio.martin@artica.es> 2013-07-15 Sergio Martin <sergio.martin@artica.es>
* godmode/agentes/configurar_agente.php: Fixed javascript * godmode/agentes/configurar_agente.php: Fixed javascript

View File

@ -156,6 +156,7 @@ define('AGENT_STATUS_NORMAL', 0);
define('AGENT_STATUS_NOT_INIT', 5); define('AGENT_STATUS_NOT_INIT', 5);
define('AGENT_STATUS_NOT_NORMAL', 6); define('AGENT_STATUS_NOT_NORMAL', 6);
define('AGENT_STATUS_UNKNOW', 3); define('AGENT_STATUS_UNKNOW', 3);
define('AGENT_STATUS_ALERT_FIRED', 4);
define('AGENT_STATUS_WARNING', 2); define('AGENT_STATUS_WARNING', 2);
/* Visual maps contants */ /* Visual maps contants */

View File

@ -560,20 +560,21 @@ function networkmap_create_agent_node ($agent, $simple = 0, $font_size = 10, $cu
// Set node status // Set node status
switch ($status) { switch ($status) {
case 0: case AGENT_STATUS_NORMAL:
$status_color = '#8DFF1D'; // Normal monitor $status_color = '#8DFF1D';
break; break;
case 1: case AGENT_STATUS_CRITICAL:
$status_color = '#FF1D1D'; // Critical monitor $status_color = '#FF1D1D';
break; break;
case 2: case AGENT_STATUS_WARNING:
$status_color = '#FFE308'; // Warning monitor $status_color = '#FFE308';
break; break;
case 4: case AGENT_STATUS_ALERT_FIRED:
$status_color = '#FFA300'; // Alert fired $status_color = '#FFA300';
break; break;
default: default:
$status_color = '#BBBBBB'; // Unknown monitor //Unknown monitor
$status_color = '#BBBBBB';
break; break;
} }