Merge branch '2869-Filtro-de-estado-not-normal-incorrecto-en-vista-de-agent-detail' into 'develop'

Fixed bug in agent status filter

See merge request artica/pandorafms!1829
This commit is contained in:
vgilc 2018-11-30 13:21:48 +01:00
commit 71a4a6bf77
1 changed files with 7 additions and 6 deletions

View File

@ -360,12 +360,13 @@ function agents_get_agents ($filter = false, $fields = false,
AND unknown_count > 0)";
break;
case AGENT_STATUS_NOT_NORMAL:
$status_sql = "(
critical_count > 0
OR warning_count > 0
OR unknown_count > 0
OR total_count = 0
OR total_count = notinit_count)";
$status_sql =
"normal_count <> total_count";
//The AGENT_STATUS_NOT_NORMAL filter must show all agents that are not in normal status
/*"(
normal_count <> total_count
AND
(normal_count + notinit_count) <> total_count)";*/
break;
case AGENT_STATUS_NOT_INIT:
$status_sql = "(