| 
									
										
										
										
											2015-07-20 13:54:26 +10:00
										 |  |  | <?php | 
					
						
							|  |  |  | /* | 
					
						
							| 
									
										
										
										
											2015-08-16 22:07:48 +10:00
										 |  |  |  * LibreNMS device MIB browser | 
					
						
							| 
									
										
										
										
											2015-07-20 13:54:26 +10:00
										 |  |  |  * | 
					
						
							|  |  |  |  * Copyright (c) 2015 Gear Consulting Pty Ltd <github@libertysys.com.au> | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Author: Paul Gear | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * 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. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if (!isset($vars['section'])) { | 
					
						
							|  |  |  |     $vars['section'] = "mib"; | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2017-01-03 17:12:39 +00:00
										 |  |  | if (is_mib_poller_enabled($device)) { | 
					
						
							| 
									
										
										
										
											2015-07-20 13:54:26 +10:00
										 |  |  | ?>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <h4><i class="fa fa-file-text-o"></i> Device MIB associations</h4> | 
					
						
							|  |  |  | <div class="table-responsive"> | 
					
						
							|  |  |  |     <table id="mibs" class="table table-hover table-condensed mibs"> | 
					
						
							|  |  |  |         <thead> | 
					
						
							|  |  |  |             <tr> | 
					
						
							|  |  |  |                 <th data-column-id="module">Module</th> | 
					
						
							|  |  |  |                 <th data-column-id="mib">MIB</th> | 
					
						
							|  |  |  |                 <th data-column-id="included_by">Included by</th> | 
					
						
							|  |  |  |                 <th data-column-id="last_modified">Last Modified</th> | 
					
						
							|  |  |  |             </tr> | 
					
						
							|  |  |  |         </thead> | 
					
						
							|  |  |  |     </table> | 
					
						
							|  |  |  | </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-16 22:09:17 +10:00
										 |  |  | <h4><i class="fa fa-file-text-o"></i> Device MIB values</h4> | 
					
						
							|  |  |  | <div class="table-responsive"> | 
					
						
							|  |  |  |     <table id="oids" class="table table-hover table-condensed mibs"> | 
					
						
							|  |  |  |         <thead> | 
					
						
							|  |  |  |             <tr> | 
					
						
							|  |  |  |                 <th data-column-id="module">Module</th> | 
					
						
							|  |  |  |                 <th data-column-id="mib">MIB</th> | 
					
						
							|  |  |  |                 <th data-column-id="object_type">Object type</th> | 
					
						
							|  |  |  |                 <th data-column-id="oid">OID</th> | 
					
						
							|  |  |  |                 <th data-column-id="value">Value</th> | 
					
						
							|  |  |  |                 <th data-column-id="numvalue">Numeric Value</th> | 
					
						
							|  |  |  |                 <th data-column-id="last_modified">Last Modified</th> | 
					
						
							|  |  |  |             </tr> | 
					
						
							|  |  |  |         </thead> | 
					
						
							|  |  |  |     </table> | 
					
						
							|  |  |  | </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-20 13:54:26 +10:00
										 |  |  | <script> | 
					
						
							|  |  |  |     var grid = $("#mibs").bootgrid({ | 
					
						
							|  |  |  |         ajax: true, | 
					
						
							| 
									
										
										
										
											2017-06-09 04:10:30 +01:00
										 |  |  |         rowCount: [50, 100, 250, -1], | 
					
						
							| 
									
										
										
										
											2015-07-20 13:54:26 +10:00
										 |  |  |         post: function () | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return { | 
					
						
							|  |  |  |                 id: "device_mibs", | 
					
						
							|  |  |  |                 device_id: '<?php echo htmlspecialchars($device['device_id']); ?>', | 
					
						
							|  |  |  |             }; | 
					
						
							|  |  |  |         }, | 
					
						
							| 
									
										
										
										
											2016-06-15 12:58:23 +00:00
										 |  |  |         url: "ajax_table.php", | 
					
						
							| 
									
										
										
										
											2015-07-20 13:54:26 +10:00
										 |  |  |         formatters: { | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         templates: { | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | </script> | 
					
						
							| 
									
										
										
										
											2015-08-16 22:09:17 +10:00
										 |  |  | 
 | 
					
						
							|  |  |  | <script> | 
					
						
							|  |  |  |     var grid2 = $("#oids").bootgrid({ | 
					
						
							|  |  |  |         ajax: true, | 
					
						
							|  |  |  |         rowCount: [50,100,250,-1], | 
					
						
							|  |  |  |         post: function () | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return { | 
					
						
							|  |  |  |                 id: "device_oids", | 
					
						
							|  |  |  |                 device_id: '<?php echo htmlspecialchars($device['device_id']); ?>', | 
					
						
							|  |  |  |             }; | 
					
						
							|  |  |  |         }, | 
					
						
							| 
									
										
										
										
											2016-06-15 12:58:23 +00:00
										 |  |  |         url: "ajax_table.php", | 
					
						
							| 
									
										
										
										
											2015-08-16 22:09:17 +10:00
										 |  |  |         formatters: { | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         templates: { | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | </script> | 
					
						
							| 
									
										
										
										
											2016-01-07 09:25:59 +10:00
										 |  |  | <?php | 
					
						
							| 
									
										
										
										
											2016-08-18 20:28:22 -05:00
										 |  |  | } else { | 
					
						
							| 
									
										
										
										
											2016-01-07 09:25:59 +10:00
										 |  |  |     print_mib_poller_disabled(); | 
					
						
							|  |  |  | } |