"; echo __('Alerts'); echo ""; } else { print_page_header (__('Alert detail'), "images/bricks.png", false, "alert_validation"); } // Filter form 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_enabled'] = __('All (Enabled)'); $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->size = array (); if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { $table->size[0] = '20px'; $table->size[1] = '20px'; $table->size[2] = '25%'; $table->size[3] = '50%'; $table->size[4] = '25%'; $table->size[5] = '20px'; $table->size[6] = '60px'; } else { $table->size[0] = '20px'; $table->size[1] = '25%'; $table->size[2] = '50%'; $table->size[3] = '25%'; $table->size[4] = '20px'; $table->size[5] = '60px'; } $table->head = array (); if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { $table->head[0] = "" . __('P.') . ""; $table->head[1] = "" . __('F.') . ""; $table->head[2] = ''; //Placeholder for name $table->head[3] = __('Template'); $table->head[4] = __('Action'); $table->head[5] = __('Last fired'); $table->head[6] = __('Status'); $table->head[7] = __('Validate'); } else { $table->head[0] = "" . __('F.') . ""; $table->head[1] = ''; //Placeholder for name $table->head[2] = __('Template'); $table->head[3] = __('Action'); $table->head[4] = __('Last fired'); $table->head[5] = __('Status'); $table->head[6] = __('Validate'); } $table->title = __('Single alerts'); $table->titlestyle = "background-color:#799E48;"; if ($print_agent == 0) { if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) $table->head[2] = __('Module'); else $table->head[1] = __('Module'); } else { if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) $table->head[2] = __('Agent'); else $table->head[1] = __('Agent'); } $table->align = array (); if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { $table->align[6] = 'center'; $table->align[7] = 'center'; } else { $table->align[5] = 'center'; $table->align[6] = 'center'; } $table->data = array (); $total = 0; $printed = 0; $rowPair = true; $iterator = 0; foreach ($alerts_simple as $alert) { if ($rowPair) $table->rowclass[$iterator] = 'rowPair'; else $table->rowclass[$iterator] = 'rowOdd'; $rowPair = !$rowPair; $iterator++; $total++; if (empty ($alert) || $printed >= $config["block_size"] || $total <= $offset) { continue; } $printed++; array_push ($table->data, format_alert_row ($alert, false, $print_agent, $url)); } echo '
'; if (!empty ($table->data)) { pagination ($total, $url); print_table ($table); } else { echo '
'.__('No simple alerts found').'
'; } $table->title = __('Compound alerts'); $table->titlestyle = "background-color:#799E48;"; if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { $table->head[0] = ''; $table->head[1] = ''; $table->head[2] = __('Agent'); $table->head[3] = __('Description'); } else { $table->head[0] = ''; $table->head[1] = __('Agent'); $table->head[2] = __('Description'); } $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 '
'; ?>