From 052dc11cc422b8a8deb41f93187d8101abe59246 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Mon, 21 Dec 2015 09:12:04 +0100 Subject: [PATCH] Only show module group of this agent use. Tiquet: #2991 --- pandora_console/operation/agentes/estado_monitores.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pandora_console/operation/agentes/estado_monitores.php b/pandora_console/operation/agentes/estado_monitores.php index aef9b2ff1a..d257c3269b 100755 --- a/pandora_console/operation/agentes/estado_monitores.php +++ b/pandora_console/operation/agentes/estado_monitores.php @@ -437,13 +437,8 @@ function print_form_filter_monitors($id_agent, $status_filter_monitor = -1, $table->data[0][3] = html_print_input_text('status_text_monitor', $status_text_monitor, '', 30, 100, true); $table->data[0][4] = __('Module group'); $rows = db_get_all_rows_sql("SELECT * - FROM tmodule_group ORDER BY name"); - $rows = io_safe_output($rows); - $rows_count = count($rows); - for ($i = 0; $i < $rows_count; $i++) { - $rows[$i]['name'] = ui_print_truncate_text($rows[$i]['name'], 35); - } - $rows_select = array(); + FROM tmodule_group where id_mg in (SELECT id_module_group from tagente_modulo where id_agente = $id_agent ) ORDER BY name"); + if (!empty($rows)) { $rows_select[-1] = __('All'); foreach ($rows as $module_group)