diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 9f65034661..ce87594f95 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,7 @@ +2012-02-08 Vanessa Gil + * godmode/events/custom_events.php + * operation/events/events_list.php: Added criticity alert to event view. + 2012-02-08 Vanessa Gil * pandoradb.sql pandoradb.postgreSQL.sql diff --git a/pandora_console/godmode/events/custom_events.php b/pandora_console/godmode/events/custom_events.php index b2f10402b1..697ac2db08 100644 --- a/pandora_console/godmode/events/custom_events.php +++ b/pandora_console/godmode/events/custom_events.php @@ -86,6 +86,7 @@ $fields_available['user_comment'] = 'user_comment'; $fields_available['tags'] = 'tags'; $fields_available['source'] = 'source'; $fields_available['id_extra'] = 'id_extra'; +$fields_available['criticity_alert'] = 'criticity_alert'; //remove fields already selected foreach ($fields_available as $available) { diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index 5324b6396b..7315aaf6bd 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -440,6 +440,11 @@ if (in_array('id_alert_am', $show_fields)) { $table->head[$i] = __('Alert'); $table->align[$i] = 'center'; $i++; + if (in_array('criticity_alert', $show_fields)) { + $table->head[$i] = __('Criticity alert'); + $table->align[$i] = 'center'; + $i++; + } } if (in_array('criticity', $show_fields)) { $table->head[$i] = __('Criticity'); @@ -617,6 +622,10 @@ foreach ($result as $event) { if (in_array('id_alert_am',$show_fields)) { $data[$i] = $event["id_alert_am"]; $i++; + if (in_array('criticity_alert',$show_fields)) { + $data[$i] = $event["criticity_alert"]; + $i++; + } } if (in_array('criticity',$show_fields)) { @@ -826,9 +835,9 @@ foreach ($result as $event) { //$odd = ''; $odd = ($odd == '')? 'rowOdd' : ''; - if ($event["criticity"] != '') { - $string .= '' . '' . __('Criticity') . ''; - $string .= $event["criticity"]; + if ($event["criticity_alert"] != 0) { + $string .= '' . '' . __('Criticity alert') . ''; + $string .= $event["criticity_alert"]; $string .= ''; $odd = ($odd == '')? 'rowOdd' : ''; } @@ -892,7 +901,12 @@ foreach ($result as $event) { $string .= '- ' . __('Empty') . ' -'; $odd = ($odd == '')? 'rowOdd' : ''; } - + if ($event["criticity"] != 0) { + $string .= '' . '' . __('Criticity') . ''; + $string .= $event["criticity"]; + $string .= ''; + $odd = ($odd == '')? 'rowOdd' : ''; + } $string .= ''; $string .= '';