'alerts', 'entity_type' => 'all']); $navbar['options']['all']['text'] = escape_html(nicecase('all')); if ($vars['entity_type'] === 'all') { $navbar['options']['all']['class'] = "active"; $navbar['options']['all']['url'] = generate_url($vars, ['page' => 'alerts', 'entity_type' => NULL]); } foreach ($types as $thing) { if ($vars['entity_type'] == $thing['entity_type']) { $navbar['options'][$thing['entity_type']]['class'] = "active"; $navbar['options'][$thing['entity_type']]['url'] = generate_url($vars, ['page' => 'alerts', 'entity_type' => NULL]); } else { if ($types_count > 6) { $navbar['options'][$thing['entity_type']]['class'] = "icon"; } $navbar['options'][$thing['entity_type']]['url'] = generate_url($vars, ['page' => 'alerts', 'entity_type' => $thing['entity_type']]); } $navbar['options'][$thing['entity_type']]['icon'] = $config['entities'][$thing['entity_type']]['icon']; $navbar['options'][$thing['entity_type']]['text'] = $config['entities'][$thing['entity_type']]['names']; } // Add filters to navbar navbar_alerts_filter($navbar, $vars); // Print out the navbar defined above print_navbar($navbar); // Cache the alert_tests table for use later $alert_rules = cache_alert_rules($vars); // Print out a table of alerts matching $vars if ($vars['status'] !== 'failed') { $vars['pagination'] = TRUE; } print_alert_table($vars); register_html_title('Alerts'); if (is_string($vars['entity_type']) && isset($config['entities'][$vars['entity_type']]['names'])) { register_html_title($config['entities'][$vars['entity_type']]['names']); } // EOF