From 9af35a531fc89c1135433b78f3673ce986b5e217 Mon Sep 17 00:00:00 2001 From: vgilc Date: Thu, 22 May 2014 08:34:40 +0000 Subject: [PATCH] 2014-05-22 Vanessa Gil * godmode/setup/setup_visuals.php include/functions_config.php operation/agentes/estado_monitores.php: Added optional module pagination. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9983 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 9 ++++++++- pandora_console/godmode/setup/setup_visuals.php | 5 +++++ pandora_console/include/functions_config.php | 2 ++ .../operation/agentes/estado_monitores.php | 17 +++++++++++++---- 4 files changed, 28 insertions(+), 5 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index c10922f858..a8028a71a3 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,10 +1,17 @@ +2014-05-22 Vanessa Gil + + * godmode/setup/setup_visuals.php + include/functions_config.php + operation/agentes/estado_monitores.php: Added optional + module pagination. + 2014-05-21 Sergio Martin * include/functions_graph.php: Fix unknown graphs in graphs with only negative values. Now the unknown graph is always positive Ticket: #569 -2014-05-22 Vanessa Gil +2014-05-21 Vanessa Gil * godmode/servers/manage_recontask.php operation/servers/recon_view.php: Added tabs. diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 61c283db4c..7f6f34e248 100644 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -368,6 +368,11 @@ $table->data[$row][1] = html_print_textarea('custom_report_front_footer', 5, 15, $row++; +$table->data[$row][0] = __('Paginate module view'); +$table->data[$row][1] = html_print_checkbox('paginate_module', 1, $config['paginate_module'], true); + +$row++; + echo '
'; html_print_input_hidden ('update_config', 1); html_print_table ($table); diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 4d03ed6071..c54e95063d 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -426,6 +426,8 @@ function config_update_config () { $error_update[] = __('Default icon in GIS'); if (!config_update_value ('autohidden_menu', get_parameter('autohidden_menu'))) $error_update[] = __('Autohidden menu'); + if (!config_update_value ('paginate_module', get_parameter('paginate_module'))) + $error_update[] = __('Paginate module'); $interval_values = get_parameter ('interval_values'); diff --git a/pandora_console/operation/agentes/estado_monitores.php b/pandora_console/operation/agentes/estado_monitores.php index bc2f1f88a0..9963053fa5 100644 --- a/pandora_console/operation/agentes/estado_monitores.php +++ b/pandora_console/operation/agentes/estado_monitores.php @@ -317,8 +317,11 @@ if ($monitors_change_filter) { else { $limit = " LIMIT " . $config['block_size'] . " OFFSET " . get_parameter ('offset',0); } - -$modules = db_get_all_rows_sql ($sql . $limit); +if ($config['paginate_module']) { + $modules = db_get_all_rows_sql ($sql . $limit); +} else { + $modules = db_get_all_rows_sql ($sql); +} if (empty ($modules)) { $modules = array (); } @@ -680,9 +683,15 @@ else { "status_filter_monitor=" . $status_filter_monitor . "&" . "status_text_monitor=" . $status_text_monitor; - ui_pagination ($count_modules, $url); + if ($config['paginate_module']) { + ui_pagination ($count_modules, $url); + } + html_print_table ($table); - ui_pagination ($count_modules, $url); + + if ($config['paginate_module']) { + ui_pagination ($count_modules, $url); + } } unset ($table);