mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Cleanup generate_sensor_link (#12154)
* Cleanup generate_sensor_link * Cleanup generate_sensor_link * remove fixifname on sensor function * Update functions.inc.php Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
@@ -502,10 +502,8 @@ function generate_port_link($port, $text = null, $type = null, $overlib = 1, $si
|
||||
|
||||
function generate_sensor_link($args, $text = null, $type = null)
|
||||
{
|
||||
$args = cleanPort($args);
|
||||
|
||||
if (! $text) {
|
||||
$text = fixIfName($args['sensor_descr']);
|
||||
$text = $args['sensor_descr'];
|
||||
}
|
||||
|
||||
if (! $type) {
|
||||
@@ -544,11 +542,8 @@ function generate_sensor_link($args, $text = null, $type = null)
|
||||
$content .= '</div>';
|
||||
|
||||
$url = generate_sensor_url($args);
|
||||
if (port_permitted($args['interface_id'], $args['device_id'])) {
|
||||
return overlib_link($url, $text, $content, null);
|
||||
} else {
|
||||
return fixifName($text);
|
||||
}
|
||||
|
||||
return overlib_link($url, $text, $content, null);
|
||||
}//end generate_sensor_link()
|
||||
|
||||
function generate_sensor_url($sensor, $vars = [])
|
||||
|
||||
Reference in New Issue
Block a user