* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2023 Observium Limited * */ if (!isset($vars['section'])) { $vars['section'] = 'eventlog'; } $sections = ['eventlog']; if ($config['enable_syslog']) { $sections[] = 'syslog'; if (OBSERVIUM_EDITION != 'community') { $sections[] = 'logalert'; } } $sections[] = 'alertlog'; $navbar['brand'] = "Logging"; $navbar['class'] = "navbar-narrow"; foreach ($sections as $section) { $type = strtolower($section); if (!isset($vars['section'])) { $vars['section'] = $section; } if ($vars['section'] == $section) { $navbar['options'][$section]['class'] = "active"; } $navbar['options'][$section]['url'] = generate_url(['page' => 'device', 'device' => $device['device_id'], 'tab' => 'logs', 'section' => $section]); $navbar['options'][$section]['text'] = nicecase($section); } print_navbar($navbar); switch ($vars['section']) { case 'syslog': case 'eventlog': case 'alertlog': case 'logalert': include($config['html_dir'] . '/pages/device/logs/' . $vars['section'] . '.inc.php'); break; default: echo('

Error. No section ' . $vars['section'] . '.
Please report this to observium developers.

'); break; } // EOF