From 590c7f748048b154e111bf384aa85f03fdccea65 Mon Sep 17 00:00:00 2001 From: Daniel Cebrian Date: Tue, 26 Dec 2023 17:22:19 +0100 Subject: [PATCH] #12686 fixed filter in tree module group --- pandora_console/include/class/Tree.class.php | 2 +- pandora_console/include/class/TreeModuleGroup.class.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index 1d8ac12d63..da0034ac88 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -304,7 +304,7 @@ class Tree } $filter_status = ''; - if ((int) $this->filter['statusModule'] !== -1 && $this->type === 'module') { + if ((int) $this->filter['statusModule'] !== -1 && ($this->type === 'module' || $this->type === 'module_group')) { $filter_status = ' AND tae.estado = '.$this->filter['statusModule']; } diff --git a/pandora_console/include/class/TreeModuleGroup.class.php b/pandora_console/include/class/TreeModuleGroup.class.php index 77f4b364c4..47dba241ac 100644 --- a/pandora_console/include/class/TreeModuleGroup.class.php +++ b/pandora_console/include/class/TreeModuleGroup.class.php @@ -31,8 +31,8 @@ class TreeModuleGroup extends Tree 'tmg.id_mg AS id', ]; $this->L1inner = 'INNER JOIN tmodule_group tmg ON tmg.id_mg = x2.g'; - $this->L1innerInside = 'INNER JOIN tagente_modulo tam - ON ta.id_agente = tam.id_agente'; + $this->L1innerInside = 'INNER JOIN tagente_modulo tam ON ta.id_agente = tam.id_agente + INNER JOIN tagente_estado tae ON tae.id_agente_modulo = tam.id_agente_modulo'; $this->L1orderByFinal = 'tmg.name'; $this->L2condition = 'AND tam.id_module_group = '.$this->rootID;