#17267 pagination token

This commit is contained in:
Jonathan 2024-04-29 13:12:47 +02:00
parent dbc20faeb2
commit d0ebee12ff
2 changed files with 7 additions and 7 deletions

View File

@ -1543,7 +1543,12 @@ if (check_login()) {
include_once $config['homedir'].'/include/functions_graph.php';
$agent = get_parameter('agent');
$id_agente = $agent;
$network_interfaces_by_agents = agents_get_network_interfaces([$agent], false, true, get_parameter('offset', 0));
$paginate_module = false;
if (isset($config['paginate_module']) === true) {
$paginate_module = (bool) $config['paginate_module'];
}
$network_interfaces_by_agents = agents_get_network_interfaces([$agent], false, $paginate_module, get_parameter('offset', 0));
$count_network_incerfaces = agents_get_network_interfaces([$agent], false, false, 0, true);
$network_interfaces = [];
if (empty($network_interfaces_by_agents) === false && empty($network_interfaces_by_agents[$id_agente]) === false) {
@ -1566,11 +1571,6 @@ if (check_login()) {
$table_interface->data = [];
$event_text_cont = 0;
$paginate_module = false;
if (isset($config['paginate_module']) === true) {
$paginate_module = (bool) $config['paginate_module'];
}
foreach ($network_interfaces as $interface_name => $interface) {
if (empty($interface['traffic']) === false) {
$permission = check_acl_one_of_groups($config['id_user'], $all_groups, 'RR');

View File

@ -1721,7 +1721,7 @@ function agents_get_modules(
);
$limit = '';
if ($pagination === true) {
if ($pagination === true && isset($config['paginate_module']) === true) {
if ($offset === 0) {
$limit = ' LIMIT '.$config['block_size'].' OFFSET 0';
} else {