2012-02-08 Vanessa Gil <vanessa.gil@artica.es>

* godmode/events/custom_events.php
	* operation/events/events_list.php: Added criticity alert to event view.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5516 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
vgilc 2012-02-08 11:27:36 +00:00
parent 29a784086f
commit e54882a3b1
3 changed files with 23 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2012-02-08 Vanessa Gil <vanessa.gil@artica.es>
* godmode/events/custom_events.php
* operation/events/events_list.php: Added criticity alert to event view.
2012-02-08 Vanessa Gil <vanessa.gil@artica.es>
* pandoradb.sql
pandoradb.postgreSQL.sql

View File

@ -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) {

View File

@ -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 .= '<tr class="' . $odd . '"><td align="left" valign="top">' . '<b>' . __('Criticity') . '</td><td align="left">';
$string .= $event["criticity"];
if ($event["criticity_alert"] != 0) {
$string .= '<tr class="' . $odd . '"><td align="left" valign="top">' . '<b>' . __('Criticity alert') . '</td><td align="left">';
$string .= $event["criticity_alert"];
$string .= '</td></tr><tr>';
$odd = ($odd == '')? 'rowOdd' : '';
}
@ -892,7 +901,12 @@ foreach ($result as $event) {
$string .= '<i>- ' . __('Empty') . ' -</i>';
$odd = ($odd == '')? 'rowOdd' : '';
}
if ($event["criticity"] != 0) {
$string .= '<tr class="' . $odd . '"><td align="left" valign="top">' . '<b>' . __('Criticity') . '</td><td align="left">';
$string .= $event["criticity"];
$string .= '</td></tr><tr>';
$odd = ($odd == '')? 'rowOdd' : '';
}
$string .= '</td></tr>';
$string .= '</table>';