diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index af7cf9cf8f..138dd51005 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2014-07-07 Miguel de Dios + + * operation/agentes/alerts_status.php: fixed the pagination with + the column sorted. + + INCIDENT: #977 + 2014-07-04 Alejandro Gallardo * index.php: Now the shortcut bar isn't loaded while diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index 992927333b..f4fa515793 100644 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -258,7 +258,8 @@ else { $alerts = array(); -$options_simple = array('offset' => $offset_simple, 'limit' => $config['block_size'], 'order' => $order); +$options_simple = array('offset' => $offset_simple, + 'limit' => $config['block_size'], 'order' => $order); $filter_alert = array(); if($filter_standby == 'standby_on') { @@ -322,11 +323,11 @@ else { } if ($tab != null) { - $url = $url.'&tab='.$tab; + $url = $url.'&tab=' . $tab; } if ($pure) { - $url .= '&pure='.$pure; + $url .= '&pure=' . $pure; } // Filter form @@ -345,13 +346,17 @@ $table->align = array (); if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { if ($print_agent) { if (!defined('METACONSOLE')) { - $table->head[0] = "" . __('P.') . ""; + $table->head[0] = "" . + __('P.') . ""; } - $table->head[1] = "" . __('S.') . ""; + $table->head[1] = "" . + __('S.') . ""; if (!defined('METACONSOLE')) { - $table->head[2] = "" . __('F.') . ""; + $table->head[2] = + "" . + __('F.') . ""; } $table->head[3] = __('Agent'); @@ -481,6 +486,12 @@ else } } + +if ($sortField) { + $url .= '&sort_field=' . $sortField; + $url .= '&sort=' . $sort; +} + $table->data = array (); $rowPair = true; @@ -496,9 +507,10 @@ foreach ($alerts['alerts_simple'] as $alert) { } if (!empty ($table->data)) { - echo '
'; + echo ''; - ui_pagination ($countAlertsSimple, $url, $offset_simple, 0, false, 'offset_simple'); + ui_pagination ($countAlertsSimple, $url, $offset_simple, 0, false, + 'offset_simple'); html_print_table ($table); if (!defined('METACONSOLE')) {