Inventory'; echo '
| Index | Description | Type | Status | Errors | Load | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| " . $hrdevice['hrDeviceIndex'] . ' | '; if ($hrdevice['hrDeviceType'] == 'hrDeviceProcessor') { $proc_id = dbFetchCell("SELECT processor_id FROM processors WHERE device_id = '" . $device['device_id'] . "' AND hrDeviceIndex = '" . $hrdevice['hrDeviceIndex'] . "'"); $proc_url = 'device/device=' . $device['device_id'] . '/tab=health/metric=processor/'; $proc_popup = "onmouseover=\"return overlib('" . $hrdevice['hrDeviceDescr'] . ' | '; $graph_array['height'] = '20'; $graph_array['width'] = '100'; $graph_array['to'] = \LibreNMS\Config::get('time.now'); $graph_array['id'] = $proc_id; $graph_array['type'] = 'processor_usage'; $graph_array['from'] = \LibreNMS\Config::get('time.day'); $graph_array_zoom = $graph_array; $graph_array_zoom['height'] = '150'; $graph_array_zoom['width'] = '400'; $mini_graph = overlib_link($proc_url, generate_lazy_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), null); echo '' . $mini_graph . ' | '; } elseif ($hrdevice['hrDeviceType'] == 'hrDeviceNetwork') { $int = str_replace('network interface ', '', $hrdevice['hrDeviceDescr']); $interface = dbFetchRow('SELECT * FROM ports WHERE device_id = ? AND (ifDescr = ? or ifName = ?)', [$device['device_id'], $int, $int]); $interface = cleanPort($interface); if ($interface['ifIndex']) { if (! empty($interface['port_descr_type'])) { $interface_text = $interface['port_descr_type'] . ' (' . $int . ')'; } else { $interface_text = $int; } echo '' . generate_port_link($interface, $interface_text) . ' | '; $graph_array['height'] = '20'; $graph_array['width'] = '100'; $graph_array['to'] = \LibreNMS\Config::get('time.now'); $graph_array['id'] = $interface['port_id']; $graph_array['type'] = 'port_bits'; $graph_array['from'] = \LibreNMS\Config::get('time.day'); $graph_array_zoom = $graph_array; $graph_array_zoom['height'] = '150'; $graph_array_zoom['width'] = '400'; $mini_graph = overlib_link(generate_port_url($interface), generate_lazy_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), null); echo "$mini_graph | "; } else { echo '' . stripslashes($hrdevice['hrDeviceDescr']) . ' | '; echo ''; } } else { echo ' | ' . stripslashes($hrdevice['hrDeviceDescr']) . ' | '; echo ''; }//end if echo ' | ' . $hrdevice['hrDeviceType'] . ' | ' . $hrdevice['hrDeviceStatus'] . ' | '; echo '' . $hrdevice['hrDeviceErrors'] . ' | ' . $hrdevice['hrProcessorLoad'] . ' | '; echo '