2010-07-26 Sergio Martin <sergio.martin@artica.es>
* include/functions_db.php: Changed the priority of the status of agents and groups when get status from their descendents git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3064 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
52b88cb014
commit
c0b557c6c6
|
@ -1,3 +1,9 @@
|
|||
2010-07-26 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_db.php: Changed the priority of the
|
||||
status of agents and groups when get status from their
|
||||
descendents
|
||||
|
||||
2010-07-26 Miguel de Dios <miguel.dedios@artica.es>
|
||||
* include/functions_db.php: added into the function "get_group_icon" the
|
||||
return icon for "all" group.
|
||||
|
|
|
@ -2690,10 +2690,6 @@ function get_agent_status ($id_agent = 0) {
|
|||
if(is_int(array_search(4,$modules_status))){
|
||||
return 4;
|
||||
}
|
||||
// Checking if any module has unknown status (3)
|
||||
elseif(is_int(array_search(3,$modules_status))){
|
||||
return 3;
|
||||
}
|
||||
// Checking if any module has critical status (1)
|
||||
elseif(is_int(array_search(1,$modules_status))){
|
||||
return 1;
|
||||
|
@ -2702,6 +2698,10 @@ function get_agent_status ($id_agent = 0) {
|
|||
elseif(is_int(array_search(2,$modules_status))){
|
||||
return 2;
|
||||
}
|
||||
// Checking if any module has unknown status (3)
|
||||
elseif(is_int(array_search(3,$modules_status))){
|
||||
return 3;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
|
@ -2728,14 +2728,6 @@ function get_group_status ($id_group = 0) {
|
|||
if(is_int(array_search(4,$agents_status))){
|
||||
return 4;
|
||||
}
|
||||
// Checking if any agent has unknown status (-1)
|
||||
elseif(is_int(array_search(-1,$agents_status))){
|
||||
return -1;
|
||||
}
|
||||
// Checking if any agents module has unknown status (3)
|
||||
elseif(is_int(array_search(3,$agents_status))){
|
||||
return 3;
|
||||
}
|
||||
// Checking if any agent has critical status (1)
|
||||
elseif(is_int(array_search(1,$agents_status))){
|
||||
return 1;
|
||||
|
@ -2744,6 +2736,14 @@ function get_group_status ($id_group = 0) {
|
|||
elseif(is_int(array_search(2,$agents_status))){
|
||||
return 2;
|
||||
}
|
||||
// Checking if any agent has unknown status (-1)
|
||||
elseif(is_int(array_search(-1,$agents_status))){
|
||||
return -1;
|
||||
}
|
||||
// Checking if any agents module has unknown status (3)
|
||||
elseif(is_int(array_search(3,$agents_status))){
|
||||
return 3;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue