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:
parent
c441dbb3bb
commit
a7a4ebbdc6
|
@ -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
|
||||
|
|
|
@ -66,8 +66,8 @@ if ($create_network_from_module) {
|
|||
$warning_instructions = $data_module["warning_instructions"];
|
||||
$unknown_instructions = $data_module["unknown_instructions"];
|
||||
$critical_inverse = $data_module["critical_inverse"];
|
||||
$warning_inverse = $data_module["warning_inverse"];
|
||||
$id_category = $data_module["id_category"];
|
||||
$warning_inverse = $data_module["warning_inverse"];
|
||||
$id_category = $data_module["id_category"];
|
||||
}
|
||||
|
||||
$id_component_type = (int) get_parameter ('id_component_type');
|
||||
|
|
|
@ -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 ';
|
||||
}
|
||||
|
@ -1314,9 +1319,9 @@ function events_get_event_types ($type_id){
|
|||
case 'normal': $type_desc = __('Monitor Normal');
|
||||
break;
|
||||
case 'alert_fired': $type_desc = __('Alert fired');
|
||||
break;
|
||||
break;
|
||||
case 'alert_recovered': $type_desc = __('Alert recovered');
|
||||
break;
|
||||
break;
|
||||
case 'alert_ceased': $type_desc = __('Alert ceased');
|
||||
break;
|
||||
case 'alert_manual_validation': $type_desc = __('Alert manual validation');
|
||||
|
@ -1356,19 +1361,24 @@ function events_get_event_types ($type_id){
|
|||
function events_get_severity_types ($severity_id){
|
||||
|
||||
$diferent_types = get_priorities ();
|
||||
|
||||
|
||||
$severity_desc = '';
|
||||
switch ($severity_id) {
|
||||
case 0: $severity_desc = __('Maintenance');
|
||||
break;
|
||||
case 1: $severity_desc = __('Informational');
|
||||
break;
|
||||
case 2: $severity_desc = __('Normal');
|
||||
break;
|
||||
case 3: $severity_desc = __('Warning');
|
||||
break;
|
||||
case 4: $severity_desc = __('Critical');
|
||||
break;
|
||||
case 0:
|
||||
$severity_desc = __('Maintenance');
|
||||
break;
|
||||
case 1:
|
||||
$severity_desc = __('Informational');
|
||||
break;
|
||||
case 2:
|
||||
$severity_desc = __('Normal');
|
||||
break;
|
||||
case 3:
|
||||
$severity_desc = __('Warning');
|
||||
break;
|
||||
case 4:
|
||||
$severity_desc = __('Critical');
|
||||
break;
|
||||
default:
|
||||
if (isset($config['text_char_long'])) {
|
||||
foreach ($diferent_types as $key => $type) {
|
||||
|
|
|
@ -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>';
|
||||
$output .= '<caption style="text-align: left"><h4>' . $table->caption . '</h4></caption>';
|
||||
}
|
||||
|
||||
if (!empty ($table->head)) {
|
||||
$countcols = count ($table->head);
|
||||
$output .= '<thead><tr>';
|
||||
|
|
|
@ -494,8 +494,8 @@ $(document).ready( function() {
|
|||
$("#row_name").css('visibility', 'hidden');
|
||||
$("#submit-update_filter").css('visibility', 'hidden');
|
||||
$("#id_group").val(0);
|
||||
|
||||
clear_tags_inputs();
|
||||
|
||||
clear_tags_inputs();
|
||||
}
|
||||
// If filter selected then load filter
|
||||
else {
|
||||
|
|
|
@ -199,7 +199,7 @@ if (check_acl ($config['id_user'], 0, "AR")) {
|
|||
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
|
||||
$own_groups = array_keys(users_get_groups($config['id_user'], "IR"));
|
||||
else
|
||||
$own_groups = array_keys(users_get_groups($config['id_user'], "IR", false));
|
||||
$own_groups = array_keys(users_get_groups($config['id_user'], "IR", false));
|
||||
|
||||
foreach ($gisMaps as $gisMap) {
|
||||
$is_in_group = in_array($gisMap['group_id'], $own_groups);
|
||||
|
|
Loading…
Reference in New Issue