From 9978bbe64584ba2f2e5081f536c0927a943df288 Mon Sep 17 00:00:00 2001 From: miguel angel rasteu Date: Thu, 20 Jul 2023 09:42:09 +0200 Subject: [PATCH] #11754 Add pagination --- pandora_console/godmode/reporting/graphs.php | 32 +++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/pandora_console/godmode/reporting/graphs.php b/pandora_console/godmode/reporting/graphs.php index 6e66c886fb..1a5fbb4283 100644 --- a/pandora_console/godmode/reporting/graphs.php +++ b/pandora_console/godmode/reporting/graphs.php @@ -488,14 +488,38 @@ if (!empty($graphs)) { true ); $ActionButtons[] = ''; + + $offset = (int) get_parameter('offset', 0); + $block_size = (int) $config['block_size']; + + $tablePagination = ui_pagination( + count($graphs), + false, + $offset, + $block_size, + true, + 'offset', + false + ); } // FALTA METER EL PRINT TABLE. html_print_table($table); - html_print_action_buttons( - implode('', $ActionButtons), - ['type' => 'form_action'] - ); + + if (is_metaconsole() === true) { + html_print_action_buttons( + implode('', $ActionButtons), + ['type' => 'form_action'] + ); + } else { + html_print_action_buttons( + implode('', $ActionButtons), + [ + 'type' => 'form_action', + 'right_content' => $tablePagination, + ] + ); + } } echo '';