".__('Pandora Agents')." > ".__('Alerts').''; if (get_parameter ('alert_validate')) { $ids = (array) get_parameter_post ("validate", array ()); $compound_ids = (array) get_parameter_post ("validate_compound", array ()); if (! empty ($ids) || ! empty ($compound_ids)) { require_once ("include/functions_alerts.php"); $result1 = validate_alert_agent_module ($ids); $result2 = validate_alert_compound ($compound_ids); $result == $result1 || $result2; print_error_message ($result, __('Alert(s) validated'), __('Error processing alert(s)')); } } echo '
'; if ($print_agent) { $table->width = '90%'; $table->data = array (); $table->style = array (); $table->data[0][0] = __('Group'); $table->data[0][1] = print_select (get_user_groups (), "ag_group", $id_group, 'javascript:this.form.submit();', '', '', true); $alert_status_filter = array(); $alert_status_filter['all'] = __('All'); $alert_status_filter['fired'] = __('Fired'); $alert_status_filter['notfired'] = __('Not fired'); $alert_status_filter['disabled'] = __('Disabled'); $table->data[0][2] = __('Status'); $table->data[0][3] = print_select ($alert_status_filter, "filter", $filter, 'javascript:this.form.submit();', '', '', true); print_table ($table); } echo '
'; $table->width = '90%'; $table->class = "databox"; $table->head = array (); $table->head[0] = ''; $table->head[1] = ''; //Placeholder for name $table->head[2] = __('Template'); $table->head[3] = __('Last fired'); $table->head[4] = __('Status'); $table->head[5] = __('Validate').pandora_help ('alert_validation', true); $table->title = __('Single alerts'); if ($print_agent == 0) { $table->head[1] = __('Module'); } else { $table->head[1] = __('Agent'); } $table->align = array (); $table->align[4] = 'center'; $table->align[5] = 'center'; $table->data = array (); $total = 0; $printed = 0; foreach ($alerts_simple as $alert) { $total++; if (empty ($alert) || $printed >= $config["block_size"] || $total <= $offset) { continue; } $printed++; array_push ($table->data, format_alert_row ($alert, false, $print_agent, $url)); } if (!empty ($table->data)) { pagination ($total, $url, $offset); print_table ($table); } else { echo '
'.__('No simple alerts found').'
'; } $table->title = __('Compound alerts'); $table->head[1] = __('Agent'); $table->head[2] = __('Name'); $table->data = array (); $combined_total = 0; $combined_printed = 0; foreach ($alerts_combined as $alert) { $combined_total++; if (empty ($alert) || $combined_printed >= $config["block_size"] || $combined_total <= $offset) { continue; } $combined_printed++; array_push ($table->data, format_alert_row ($alert, true, $print_agent)); } if (!empty ($table->data)) { pagination ($total, $url, $offset); print_table ($table); } if ($printed > 0 || $combined_total > 0) { echo '
'; print_submit_button (__('Validate'), 'alert_validate', false, 'class="sub upd"', false); echo '
'; } echo ''; ?>