#17267 pagination token
This commit is contained in:
parent
dbc20faeb2
commit
d0ebee12ff
|
@ -1543,7 +1543,12 @@ if (check_login()) {
|
||||||
include_once $config['homedir'].'/include/functions_graph.php';
|
include_once $config['homedir'].'/include/functions_graph.php';
|
||||||
$agent = get_parameter('agent');
|
$agent = get_parameter('agent');
|
||||||
$id_agente = $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);
|
$count_network_incerfaces = agents_get_network_interfaces([$agent], false, false, 0, true);
|
||||||
$network_interfaces = [];
|
$network_interfaces = [];
|
||||||
if (empty($network_interfaces_by_agents) === false && empty($network_interfaces_by_agents[$id_agente]) === false) {
|
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 = [];
|
$table_interface->data = [];
|
||||||
$event_text_cont = 0;
|
$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) {
|
foreach ($network_interfaces as $interface_name => $interface) {
|
||||||
if (empty($interface['traffic']) === false) {
|
if (empty($interface['traffic']) === false) {
|
||||||
$permission = check_acl_one_of_groups($config['id_user'], $all_groups, 'RR');
|
$permission = check_acl_one_of_groups($config['id_user'], $all_groups, 'RR');
|
||||||
|
|
|
@ -1721,7 +1721,7 @@ function agents_get_modules(
|
||||||
);
|
);
|
||||||
|
|
||||||
$limit = '';
|
$limit = '';
|
||||||
if ($pagination === true) {
|
if ($pagination === true && isset($config['paginate_module']) === true) {
|
||||||
if ($offset === 0) {
|
if ($offset === 0) {
|
||||||
$limit = ' LIMIT '.$config['block_size'].' OFFSET 0';
|
$limit = ' LIMIT '.$config['block_size'].' OFFSET 0';
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue