35) { $name = substr($name, 0, 35) . "..."; } if (strlen($result['entPhysicalModelName'])) { $model = $result['entPhysicalModelName']; } elseif (strlen($result['entPhysicalDescr'])) { $model = $result['entPhysicalDescr']; } elseif (strlen($result['entPhysicalName'])) { $model = $result['entPhysicalName']; } else { $model = ""; } /// FIXME: once we have alerting, colour this to the sensor's status $tab_colour = '#194B7F'; // FIXME: This colour pulled from functions.inc.php humanize_device, maybe set it centrally in definitions? $status_search_results[] = array('url' => generate_device_url($result, array('tab' => 'entphysical')), 'name' => $name, 'colour' => $tab_colour, 'icon' => $config['icon']['inventory'], 'data' => array( escape_html($result['hostname']), html_highlight(escape_html($model) . ' | SN: ' . escape_html($result['entPhysicalSerialNum']), $queryString) ) ); } $search_results['status'] = array('descr' => 'Inventory entry found', 'results' => $status_search_results); } // EOF