2013-04-16 Miguel de Dios <miguel.dedios@artica.es>

* operation/agentes/alerts_status.php: fixed the PHP warnings and
	improved the show when have not alerts.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7997 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-04-16 16:51:09 +00:00
parent 3eda71a355
commit cda074b7eb
2 changed files with 24 additions and 14 deletions

View File

@ -1,3 +1,8 @@
2013-04-16 Miguel de Dios <miguel.dedios@artica.es>
* operation/agentes/alerts_status.php: fixed the PHP warnings and
improved the show when have not alerts.
2013-04-16 Miguel de Dios <miguel.dedios@artica.es>
* godmode/groups/group_list.php: fixed notice PHP.

View File

@ -54,7 +54,11 @@ $flag_alert = (bool) get_parameter ('force_execution', 0);
$alert_validate = (bool) get_parameter ('alert_validate', 0);
$tab = get_parameter_get ("tab", null);
$url = 'index.php?sec='.$sec.'&sec2='.$sec2.'&refr='.$config["refr"].'&filter='.$filter.'&filter_standby='.$filter_standby.'&ag_group='.$id_group;
$refr = (int)get_parameter('refr', 0);
$url = 'index.php?sec=' . $sec . '&sec2=' . $sec2 . '&refr=' . $refr .
'&filter=' . $filter . '&filter_standby=' . $filter_standby .
'&ag_group=' . $id_group;
if ($flag_alert == 1 && check_acl($config['id_user'], $id_group, "AW")) {
forceExecution($id_group);
@ -104,7 +108,8 @@ else {
if ($alert_validate) {
if (check_acl ($config["id_user"], $id_group, "AW") == 0) {
echo '<h3 class="error">'.__('Insufficient permissions to validate alerts').'</h3>';
echo '<h3 class="error">' .
__('Insufficient permissions to validate alerts') . '</h3>';
}
else {
validateAlert();
@ -376,26 +381,26 @@ foreach ($alerts['alerts_simple'] as $alert) {
array_push ($table->data, ui_format_alert_row ($alert, $print_agent, $url, 'font-size: 7pt;'));
}
echo '<form method="post" action="'.$url.'">';
if (!empty ($table->data)) {
echo '<form method="post" action="'.$url.'">';
ui_pagination ($countAlertsSimple, $url, $offset_simple, 0, false, 'offset_simple');
html_print_table ($table);
if (check_acl ($config["id_user"], $id_group, "AW") || check_acl ($config["id_user"], $id_group, "AM")) {
if (count($alerts['alerts_simple']) > 0) {
echo '<div class="action-buttons" style="width: '.$table->width.';">';
html_print_submit_button (__('Validate'), 'alert_validate', false, 'class="sub ok"', false);
echo '</div>';
}
}
echo '</form>';
}
else {
echo '<div class="nf">'.__('No alerts found').'</div>';
}
if (check_acl ($config["id_user"], $id_group, "AW") || check_acl ($config["id_user"], $id_group, "AM")) {
if (count($alerts['alerts_simple']) > 0) {
echo '<div class="action-buttons" style="width: '.$table->width.';">';
html_print_submit_button (__('Validate'), 'alert_validate', false, 'class="sub ok"', false);
echo '</div>';
}
}
echo '</form>';
ui_require_css_file('cluetip');
ui_require_jquery_file('cluetip');
?>