| 
									
										
										
										
											2007-04-03 14:10:23 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-24 03:59:30 -06:00
										 |  |  | echo getLogoTag($device, 'device-icon-header pull-left') .' | 
					
						
							|  |  |  | <div class="pull-left" style="margin-top: 5px;">'; | 
					
						
							| 
									
										
										
										
											2011-04-21 12:59:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-26 22:38:43 +00:00
										 |  |  | $host_id = get_vm_parent_id($device); | 
					
						
							| 
									
										
										
										
											2016-01-25 22:04:12 +00:00
										 |  |  | if ($host_id > 0) { | 
					
						
							|  |  |  |     echo ' | 
					
						
							| 
									
										
										
										
											2017-02-24 03:59:30 -06:00
										 |  |  | <a href="'.generate_url(array('page'=>'device','device'=>$host_id)).'"><i class="fa fa-server fa-fw fa-lg"></i></a>'; | 
					
						
							| 
									
										
										
										
											2016-01-25 22:04:12 +00:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2017-02-24 03:59:30 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-01-25 22:04:12 +00:00
										 |  |  | echo ' | 
					
						
							| 
									
										
										
										
											2017-02-24 03:59:30 -06:00
										 |  |  | <span style="font-size: 20px;">'.generate_device_link($device).'</span><br /> | 
					
						
							|  |  |  | '.generate_link($device['location'], array('page' => 'devices', 'location' => $device['location'])) .' | 
					
						
							|  |  |  | </div>'; | 
					
						
							|  |  |  | //<div class="col-xs-6 col-sm-8 col-md-8">';
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-09-19 02:20:16 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-28 05:59:25 +02:00
										 |  |  | if ($device['snmp_disable']) { | 
					
						
							|  |  |  |     $graphs = $config['os']['ping']['over']; | 
					
						
							|  |  |  | } elseif (isset($config['os'][$device['os']]['over'])) { | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  |     $graphs = $config['os'][$device['os']]['over']; | 
					
						
							| 
									
										
										
										
											2016-08-18 20:28:22 -05:00
										 |  |  | } elseif (isset($device['os_group']) && isset($config['os'][$device['os_group']]['over'])) { | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  |     $graphs = $config['os'][$device['os_group']]['over']; | 
					
						
							| 
									
										
										
										
											2016-08-18 20:28:22 -05:00
										 |  |  | } else { | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  |     $graphs = $config['os']['default']['over']; | 
					
						
							| 
									
										
										
										
											2012-05-20 19:57:11 +00:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2011-09-19 02:20:16 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  | $graph_array                = array(); | 
					
						
							|  |  |  | $graph_array['height']      = '100'; | 
					
						
							|  |  |  | $graph_array['width']       = '310'; | 
					
						
							|  |  |  | $graph_array['to']          = $config['time']['now']; | 
					
						
							|  |  |  | $graph_array['device']      = $device['device_id']; | 
					
						
							|  |  |  | $graph_array['type']        = 'device_bits'; | 
					
						
							|  |  |  | $graph_array['from']        = $config['time']['day']; | 
					
						
							|  |  |  | $graph_array['legend']      = 'no'; | 
					
						
							| 
									
										
										
										
											2012-05-20 19:57:11 +00:00
										 |  |  | $graph_array['popup_title'] = $descr; | 
					
						
							| 
									
										
										
										
											2011-09-19 02:20:16 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  | $graph_array['height'] = '45'; | 
					
						
							|  |  |  | $graph_array['width']  = '150'; | 
					
						
							|  |  |  | $graph_array['bg']     = 'FFFFFF00'; | 
					
						
							| 
									
										
										
										
											2011-09-19 02:20:16 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-22 03:04:50 -05:00
										 |  |  | if (device_permitted($device['device_id']) || $config['allow_unauth_graphs']) { | 
					
						
							|  |  |  |     echo '<div class="pull-right">'; | 
					
						
							|  |  |  |     foreach ($graphs as $entry) { | 
					
						
							|  |  |  |         if ($entry['graph']) { | 
					
						
							|  |  |  |             $graph_array['type'] = $entry['graph']; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             echo "<div style='float: right; text-align: center; padding: 1px 5px; margin: 0 1px; ' class='rounded-5px'>"; | 
					
						
							|  |  |  |             print_graph_popup($graph_array); | 
					
						
							|  |  |  |             echo "<div style='font-weight: bold; font-size: 7pt; margin: -3px;'>" . $entry['text'] . '</div>'; | 
					
						
							|  |  |  |             echo '</div>'; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-03-22 03:04:50 -05:00
										 |  |  |     echo '</div>'; | 
					
						
							| 
									
										
										
										
											2012-05-20 19:57:11 +00:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2017-03-22 03:04:50 -05:00
										 |  |  | echo '<br style="clear: both;" />'; | 
					
						
							| 
									
										
										
										
											2011-09-19 02:20:16 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-05-20 19:57:11 +00:00
										 |  |  | unset($graph_array); |