From 44ea56e7d51a0461e903794bae73f886c76aabb8 Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Mon, 16 Jul 2012 10:27:16 +0000 Subject: [PATCH] 2012-07-16 Juan Manuel Ramon * operation/tree.php: Fixed module view: agents and modules disabled are hidden. Also fixed broken footer when an empty filter is selected. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6775 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/operation/tree.php | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 5c6b78ff6d..1adc761f20 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2012-07-16 Juan Manuel Ramon + + * operation/tree.php: Fixed module view: agents and modules disabled + are hidden. Also fixed broken footer when an empty filter is + selected. + 2012-07-16 Dario Rodriguez * godmode/agentes/configurar_agente.php: Fixed a bug diff --git a/pandora_console/operation/tree.php b/pandora_console/operation/tree.php index 4fce177b0a..8ad842034f 100644 --- a/pandora_console/operation/tree.php +++ b/pandora_console/operation/tree.php @@ -402,7 +402,7 @@ if (is_ajax ()) $sql .= sprintf('AND id_agente IN ( SELECT id_agente FROM tagente_modulo - WHERE nombre = \'%s\' + WHERE nombre = \'%s\' AND disabled = 0 ) ', $name); @@ -882,6 +882,8 @@ function printTree_($type) { // If there are not groups display error and return if (empty($avariableGroups)) { ui_print_error_message("There aren't agents in this agrupation"); + echo ''; + echo ''; return; } @@ -1027,6 +1029,7 @@ function printTree_($type) { $list = db_get_all_rows_sql('SELECT t1.nombre FROM tagente_modulo t1, tagente t2, tagente_estado t3 WHERE t1.id_agente = t2.id_agente AND t1.id_agente_modulo = t3.id_agente_modulo + AND t2.disabled = 0 AND t1.disabled = 0 AND t3.utimestamp !=0 AND t2.id_grupo in (' . $avariableGroupsIds . ')' .$sql_search.' GROUP BY t1.nombre ORDER BY t1.nombre'); break; @@ -1034,7 +1037,7 @@ function printTree_($type) { $list = db_get_all_rows_sql('SELECT dbms_lob.substr(t1.nombre,4000,1) as nombre FROM tagente_modulo t1, tagente t2, tagente_estado t3 WHERE t1.id_agente = t2.id_agente AND t2.id_grupo in (' . $avariableGroupsIds . ') AND t1.id_agente_modulo = t3.id_agente_modulo - AND t3.utimestamp !=0 GROUP BY dbms_lob.substr(t1.nombre,4000,1) ORDER BY dbms_lob.substr(t1.nombre,4000,1) ASC'); + AND t2.disabled = 0 AND t1.disabled = 0 AND t3.utimestamp !=0 GROUP BY dbms_lob.substr(t1.nombre,4000,1) ORDER BY dbms_lob.substr(t1.nombre,4000,1) ASC'); break; } @@ -1044,7 +1047,8 @@ function printTree_($type) { if ($list === false) { ui_print_error_message("There aren't agents in this agrupation"); - + echo ''; + echo ''; } else { echo "
    \n";