diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index bc6fcd7c84..14f105b470 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2009-11-25 Miguel de Dios + + * godmode/alerts/alert_list.php: add column status of alert in alert + management view in agent. + 2009-11-22 Raul Mateos * images/spinner.png, images/background-li.png: New images converted diff --git a/pandora_console/godmode/alerts/alert_list.php b/pandora_console/godmode/alerts/alert_list.php index 19d3c7e086..131e16a40c 100644 --- a/pandora_console/godmode/alerts/alert_list.php +++ b/pandora_console/godmode/alerts/alert_list.php @@ -342,7 +342,8 @@ if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { $table->head[4] = "" . __('P.') . ""; } $table->head[5] = __('Actions'); -$table->head[6] = ''; +$table->head[6] = __('Status'); +$table->head[7] = ''; $table->data = array (); @@ -451,12 +452,28 @@ foreach ($simple_alerts as $alert) { $data[5] .= ' ' . __('Add action'); $data[5] .= ''; - $data[6] = '
'; + $status = STATUS_ALERT_NOT_FIRED; + $title = ""; - $data[6] .= print_input_image ('delete', 'images/cross.png', 1, '', true); - $data[6] .= print_input_hidden ('delete_alert', 1, true); - $data[6] .= print_input_hidden ('id_alert', $alert['id'], true); - $data[6] .= '
'; + if ($alert["times_fired"] > 0) { + $status = STATUS_ALERT_FIRED; + $title = __('Alert fired').' '.$alert["times_fired"].' '.__('times'); + } elseif ($alert["disabled"] > 0) { + $status = STATUS_ALERT_DISABLED; + $title = __('Alert disabled'); + } else { + $status = STATUS_ALERT_NOT_FIRED; + $title = __('Alert not fired'); + } + + $data[6] = "
" . print_status_image($status, $title, true) . "
"; + + $data[7] = '
'; + + $data[7] .= print_input_image ('delete', 'images/cross.png', 1, '', true); + $data[7] .= print_input_hidden ('delete_alert', 1, true); + $data[7] .= print_input_hidden ('id_alert', $alert['id'], true); + $data[7] .= '
'; array_push ($table->data, $data); }