diff --git a/pandora_console/operation/search_agents.getdata.php b/pandora_console/operation/search_agents.getdata.php
index 57b3e29c10..522bb92d4f 100644
--- a/pandora_console/operation/search_agents.getdata.php
+++ b/pandora_console/operation/search_agents.getdata.php
@@ -136,7 +136,13 @@ if ($searchAgents) {
$select = 'SELECT DISTINCT(t1.id_agente), t1.ultimo_contacto, t1.nombre, t1.comentarios, t1.id_os, t1.intervalo, t1.id_grupo, t1.disabled, t1.alias, t1.quiet';
if (is_array($order)) {
- $limit = ' ORDER BY '.$order['field'].' '.$order['direction'];
+ // Datatables offset, limit.
+ $start = get_parameter('start', 0);
+ $length = get_parameter(
+ 'length',
+ $config['block_size']
+ );
+ $limit = ' ORDER BY '.$order['field'].' '.$order['direction'].' LIMIT '.$length.' OFFSET '.$start;
}
$query = $select.$sql;
diff --git a/pandora_console/operation/search_agents.php b/pandora_console/operation/search_agents.php
index 021f772707..eb1f0845e4 100755
--- a/pandora_console/operation/search_agents.php
+++ b/pandora_console/operation/search_agents.php
@@ -64,6 +64,11 @@ try {
'filter_main_class' => 'box-flat white_table_graph fixed_filter_bar',
]
);
+
+ html_print_action_buttons(
+ '',
+ [ 'type' => 'data_table' ]
+ );
} catch (Exception $e) {
echo $e->getMessage();
}
diff --git a/pandora_console/operation/search_main.php b/pandora_console/operation/search_main.php
index 58f75e0ca5..f3d91803fa 100644
--- a/pandora_console/operation/search_main.php
+++ b/pandora_console/operation/search_main.php
@@ -76,14 +76,10 @@ if (enterprise_installed()) {
html_print_table($table);
-if ($searchAgents && $totalAgents > 0) {
+if ($searchAgents) {
echo $list_agents;
- echo "".sprintf(
- __('Show %s of %s. View all matches'),
- $count_agents_main,
- $totalAgents
- ).'';
+ echo "".__('View all matches').'';
}
diff --git a/pandora_console/operation/search_results.php b/pandora_console/operation/search_results.php
index 41b02f21ed..6ef3a55d15 100644
--- a/pandora_console/operation/search_results.php
+++ b/pandora_console/operation/search_results.php
@@ -205,7 +205,7 @@ ui_print_standard_header(
);
$only_count = false;
-hd($searchTab);
+
switch ($searchTab) {
case 'main':
$only_count = true;