Merge branch 'ent-8563-tree-view-no-aparecen-agentes-no-inicializados' into 'develop'

Treeview not showing notinit agents when filter enabled

See merge request artica/pandorafms!4696
This commit is contained in:
Daniel Rodriguez 2022-02-15 10:18:12 +00:00
commit 2e1b8ee246
2 changed files with 4 additions and 2 deletions

View File

@ -63,7 +63,7 @@ if (is_ajax() === true) {
'searchAgent' => '',
'statusAgent' => AGENT_STATUS_ALL,
'searchModule' => '',
'statusModule' => -1,
'statusModule' => AGENT_MODULE_STATUS_ALL,
'groupID' => 0,
'tagID' => 0,
];

View File

@ -929,7 +929,9 @@ class Tree
$agents_aux = [];
foreach ($agents as $iterator => $agent) {
$this->processAgent($agents[$iterator], $server);
if ($agents[$iterator]['counters']['total'] !== '0') {
if ($agents[$iterator]['counters']['total'] !== '0'
|| (bool) $this->filter['show_not_init_agents'] === true
) {
$agents_aux[] = $agents[$iterator];
}
}