mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
improve efficiency of devices/ports/, add some caching, fix db profiling.
git-svn-id: http://www.observium.org/svn/observer/trunk@2349 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@ -250,6 +250,7 @@ function generate_port_link($args, $text = NULL, $type = NULL)
|
||||
if (!isset($args['graph_type'])) { $args['graph_type'] = 'port_bits'; }
|
||||
|
||||
$class = ifclass($args['ifOperStatus'], $args['ifAdminStatus']);
|
||||
|
||||
if (!isset($args['hostname'])) { $args = array_merge($args, device_by_id_cache($args['device_id'])); }
|
||||
|
||||
$content = "<div class=list-large>".$args['hostname']." - " . fixifName($args['label']) . "</div>";
|
||||
@ -273,7 +274,7 @@ function generate_port_link($args, $text = NULL, $type = NULL)
|
||||
|
||||
$url = generate_port_url($args);
|
||||
|
||||
if (port_permitted($args['interface_id'])) {
|
||||
if (port_permitted($args['interface_id'], $args['device_id'])) {
|
||||
return overlib_link($url, $text, $content, $class);
|
||||
} else {
|
||||
return fixifName($text);
|
||||
|
Reference in New Issue
Block a user