| 
									
										
										
										
											2011-11-16 21:09:13 +00:00
										 |  |  | <?php | 
					
						
							| 
									
										
										
										
											2017-12-29 07:36:49 +02:00
										 |  |  | /* | 
					
						
							|  |  |  |  * LibreNMS | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This program is free software: you can redistribute it and/or modify it | 
					
						
							|  |  |  |  * under the terms of the GNU General Public License as published by the | 
					
						
							|  |  |  |  * Free Software Foundation, either version 3 of the License, or (at your | 
					
						
							|  |  |  |  * option) any later version.  Please see LICENSE.txt at the top level of | 
					
						
							|  |  |  |  * the source code distribution for details. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @package    LibreNMS | 
					
						
							|  |  |  |  * @subpackage webui | 
					
						
							|  |  |  |  * @link       http://librenms.org | 
					
						
							|  |  |  |  * @copyright  2017 LibreNMS | 
					
						
							|  |  |  |  * @author     LibreNMS Contributors | 
					
						
							|  |  |  | */ | 
					
						
							| 
									
										
										
										
											2011-11-16 21:09:13 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  | if (!isset($vars['section'])) { | 
					
						
							|  |  |  |     $vars['section'] = 'eventlog'; | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2011-11-16 21:09:13 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-29 07:36:49 +02:00
										 |  |  | echo '<br>'; | 
					
						
							|  |  |  | echo '<div class="panel panel-default">'; | 
					
						
							|  |  |  | echo '<div class="panel-heading">'; | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  | echo '<strong>Logging</strong>  » '; | 
					
						
							| 
									
										
										
										
											2011-11-16 21:09:13 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  | if ($vars['section'] == 'eventlog') { | 
					
						
							|  |  |  |     echo '<span class="pagemenu-selected">'; | 
					
						
							| 
									
										
										
										
											2015-06-04 09:19:48 +02:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | echo generate_link('Event Log', $vars, array('section' => 'eventlog')); | 
					
						
							|  |  |  | if ($vars['section'] == 'eventlog') { | 
					
						
							|  |  |  |     echo '</span>'; | 
					
						
							| 
									
										
										
										
											2015-06-04 09:19:48 +02:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2011-11-16 21:09:13 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-23 00:29:12 -05:00
										 |  |  | if (\LibreNMS\Config::get('enable_syslog') == 1) { | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  |     echo ' | '; | 
					
						
							| 
									
										
										
										
											2011-11-16 21:09:13 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  |     if ($vars['section'] == 'syslog') { | 
					
						
							|  |  |  |         echo '<span class="pagemenu-selected">'; | 
					
						
							| 
									
										
										
										
											2015-06-04 09:19:48 +02:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     echo generate_link('Syslog', $vars, array('section' => 'syslog')); | 
					
						
							|  |  |  |     if ($vars['section'] == 'syslog') { | 
					
						
							|  |  |  |         echo '</span>'; | 
					
						
							| 
									
										
										
										
											2015-06-04 09:19:48 +02:00
										 |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2011-11-16 21:09:13 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-23 00:29:12 -05:00
										 |  |  | if (\LibreNMS\Config::get('graylog.port')) { | 
					
						
							| 
									
										
										
										
											2015-08-10 13:36:55 -07:00
										 |  |  |     echo ' | '; | 
					
						
							|  |  |  |     if ($vars['section'] == 'graylog') { | 
					
						
							|  |  |  |         echo '<span class="pagemenu-selected">'; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     echo generate_link('Graylog', $vars, array('section' => 'graylog')); | 
					
						
							|  |  |  |     if ($vars['section'] == 'graylog') { | 
					
						
							|  |  |  |         echo '</span>'; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-29 07:36:49 +02:00
										 |  |  | echo '</div><br>'; | 
					
						
							|  |  |  | echo '<div style="width:99%;margin:0 auto;">'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  | switch ($vars['section']) { | 
					
						
							|  |  |  |     case 'syslog': | 
					
						
							| 
									
										
										
										
											2019-04-11 23:26:42 -05:00
										 |  |  |         $vars['fromdevice'] = true; | 
					
						
							|  |  |  |         include 'includes/html/pages/syslog.inc.php'; | 
					
						
							| 
									
										
										
										
											2016-09-28 20:15:57 +01:00
										 |  |  |         break; | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  |     case 'eventlog': | 
					
						
							| 
									
										
										
										
											2019-04-11 23:26:42 -05:00
										 |  |  |         $vars['fromdevice'] = true; | 
					
						
							|  |  |  |         include 'includes/html/pages/eventlog.inc.php'; | 
					
						
							| 
									
										
										
										
											2018-08-23 22:05:18 +02:00
										 |  |  |         break; | 
					
						
							| 
									
										
										
										
											2015-08-10 13:36:55 -07:00
										 |  |  |     case 'graylog': | 
					
						
							| 
									
										
										
										
											2019-04-11 23:26:42 -05:00
										 |  |  |         include 'includes/html/pages/device/logs/'.$vars['section'].'.inc.php'; | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  |         break; | 
					
						
							| 
									
										
										
										
											2011-11-16 21:09:13 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  |     default: | 
					
						
							| 
									
										
										
										
											2017-12-29 07:36:49 +02:00
										 |  |  |         echo '</div>'; | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  |         echo report_this('Unknown section '.$vars['section']); | 
					
						
							|  |  |  |         break; | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2017-12-29 07:36:49 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | echo '</div>'; |