2014-07-07 Miguel de Dios <miguel.dedios@artica.es>

* operation/agentes/alerts_status.php: fixed the pagination with
	the column sorted.
	
	INCIDENT: #977




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@10318 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2014-07-07 09:55:04 +00:00
parent 2f50fb13bd
commit 809afd7e44
2 changed files with 27 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2014-07-07 Miguel de Dios <miguel.dedios@artica.es>
* operation/agentes/alerts_status.php: fixed the pagination with
the column sorted.
INCIDENT: #977
2014-07-04 Alejandro Gallardo <alejandro.gallardo@artica.es> 2014-07-04 Alejandro Gallardo <alejandro.gallardo@artica.es>
* index.php: Now the shortcut bar isn't loaded while * index.php: Now the shortcut bar isn't loaded while

View File

@ -258,7 +258,8 @@ else {
$alerts = array(); $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(); $filter_alert = array();
if($filter_standby == 'standby_on') { if($filter_standby == 'standby_on') {
@ -322,11 +323,11 @@ else {
} }
if ($tab != null) { if ($tab != null) {
$url = $url.'&tab='.$tab; $url = $url.'&tab=' . $tab;
} }
if ($pure) { if ($pure) {
$url .= '&pure='.$pure; $url .= '&pure=' . $pure;
} }
// Filter form // Filter form
@ -345,13 +346,17 @@ $table->align = array ();
if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) {
if ($print_agent) { if ($print_agent) {
if (!defined('METACONSOLE')) { if (!defined('METACONSOLE')) {
$table->head[0] = "<span title='" . __('Policy') . "'>" . __('P.') . "</span>"; $table->head[0] = "<span title='" . __('Policy') . "'>" .
__('P.') . "</span>";
} }
$table->head[1] = "<span title='" . __('Standby') . "'>" . __('S.') . "</span>"; $table->head[1] = "<span title='" . __('Standby') . "'>" .
__('S.') . "</span>";
if (!defined('METACONSOLE')) { if (!defined('METACONSOLE')) {
$table->head[2] = "<span title='" . __('Force execution') . "'>" . __('F.') . "</span>"; $table->head[2] =
"<span title='" . __('Force execution') . "'>" .
__('F.') . "</span>";
} }
$table->head[3] = __('Agent'); $table->head[3] = __('Agent');
@ -481,6 +486,12 @@ else
} }
} }
if ($sortField) {
$url .= '&sort_field=' . $sortField;
$url .= '&sort=' . $sort;
}
$table->data = array (); $table->data = array ();
$rowPair = true; $rowPair = true;
@ -496,9 +507,10 @@ foreach ($alerts['alerts_simple'] as $alert) {
} }
if (!empty ($table->data)) { if (!empty ($table->data)) {
echo '<form method="post" action="'.$url.'">'; echo '<form method="post" action="' . $url . '">';
ui_pagination ($countAlertsSimple, $url, $offset_simple, 0, false, 'offset_simple'); ui_pagination ($countAlertsSimple, $url, $offset_simple, 0, false,
'offset_simple');
html_print_table ($table); html_print_table ($table);
if (!defined('METACONSOLE')) { if (!defined('METACONSOLE')) {