2013-02-28 Miguel de Dios <miguel.dedios@artica.es>

* godmode/modules/manage_network_components_form.php,
	include/functions_html.php, operation/menu.php,
	operation/events/events_list.php: improved source code.
	
	* include/functions_events.php: fixed into the function
	"events_get_agent" the query to get criticities.
	
	Fixes: #3606285




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7744 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-02-28 11:57:57 +00:00
parent c441dbb3bb
commit a7a4ebbdc6
6 changed files with 45 additions and 21 deletions

View File

@ -1,3 +1,14 @@
2013-02-28 Miguel de Dios <miguel.dedios@artica.es>
* godmode/modules/manage_network_components_form.php,
include/functions_html.php, operation/menu.php,
operation/events/events_list.php: improved source code.
* include/functions_events.php: fixed into the function
"events_get_agent" the query to get criticities.
Fixes: #3606285
2013-02-28 Sergio Martin <sergio.martin@artica.es>
* include/functions_io.php

View File

@ -1235,12 +1235,17 @@ function events_get_agent ($id_agent, $period, $date = 0,
$datelimit = $date - $period;
$sql_where = ' AND 1 = 1 ';
$criticities = array();
if ($filter_event_critical) {
$sql_where .= ' AND criticity = 4 ';
$criticities[] = 4;
}
if ($filter_event_warning) {
$sql_where .= ' AND criticity = 3 ';
$criticities[] = 3;
}
if (!empty($criticities)) {
$sql_where .= ' AND criticity IN (' . implode(', ', $criticities) . ')';
}
if ($filter_event_validated) {
$sql_where .= ' AND estado = 1 ';
}
@ -1359,15 +1364,20 @@ function events_get_severity_types ($severity_id){
$severity_desc = '';
switch ($severity_id) {
case 0: $severity_desc = __('Maintenance');
case 0:
$severity_desc = __('Maintenance');
break;
case 1: $severity_desc = __('Informational');
case 1:
$severity_desc = __('Informational');
break;
case 2: $severity_desc = __('Normal');
case 2:
$severity_desc = __('Normal');
break;
case 3: $severity_desc = __('Warning');
case 3:
$severity_desc = __('Warning');
break;
case 4: $severity_desc = __('Critical');
case 4:
$severity_desc = __('Critical');
break;
default:
if (isset($config['text_char_long'])) {

View File

@ -1343,10 +1343,13 @@ function html_print_table (&$table, $return = false) {
}
$output .= ' cellpadding="'.$table->cellpadding.'" cellspacing="'.$table->cellspacing.'"';
$output .= ' border="'.$table->border.'" class="'.$table->class.'" id="'.$tableid.'">';
$countcols = 0;
if (!empty($table->caption)) {
$output .= '<caption style="text-align: left"><h4>' . $table->caption . '</h4></caption>';
}
if (!empty ($table->head)) {
$countcols = count ($table->head);
$output .= '<thead><tr>';