Treeview not showing notinit agents when filter enabled

This commit is contained in:
Luis 2022-02-14 17:55:29 +01:00
parent 06321f438b
commit 4b1c93d7b3
2 changed files with 4 additions and 2 deletions

View File

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

View File

@ -929,7 +929,9 @@ class Tree
$agents_aux = []; $agents_aux = [];
foreach ($agents as $iterator => $agent) { foreach ($agents as $iterator => $agent) {
$this->processAgent($agents[$iterator], $server); $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]; $agents_aux[] = $agents[$iterator];
} }
} }