From 4b1c93d7b39859f3072042020d1936285425e3c0 Mon Sep 17 00:00:00 2001 From: Luis Date: Mon, 14 Feb 2022 17:55:29 +0100 Subject: [PATCH] Treeview not showing notinit agents when filter enabled --- pandora_console/include/ajax/tree.ajax.php | 2 +- pandora_console/include/class/Tree.class.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/ajax/tree.ajax.php b/pandora_console/include/ajax/tree.ajax.php index c6e9670df8..c00a63df35 100644 --- a/pandora_console/include/ajax/tree.ajax.php +++ b/pandora_console/include/ajax/tree.ajax.php @@ -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, ]; diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index 8dd8b97698..0c16a66e41 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -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]; } }