mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix ports display (#14183)
* Fix ports with deleted device breaking all ports display * Only filter callable based filters when required
This commit is contained in:
@@ -139,7 +139,7 @@ class Url
|
||||
$text = $label;
|
||||
}
|
||||
|
||||
$content = '<div class=list-large>' . addslashes(htmlentities($port->device->displayName() . ' - ' . $label)) . '</div>';
|
||||
$content = '<div class=list-large>' . addslashes(htmlentities(optional($port->device)->displayName() . ' - ' . $label)) . '</div>';
|
||||
if ($description = $port->getDescription()) {
|
||||
$content .= addslashes(htmlentities($description)) . '<br />';
|
||||
}
|
||||
@@ -230,7 +230,7 @@ class Url
|
||||
*/
|
||||
public static function deviceUrl($device, $vars = [])
|
||||
{
|
||||
$routeParams = [is_numeric($device) ? $device : $device->device_id];
|
||||
$routeParams = [($device instanceof Device) ? $device->device_id : (int) $device];
|
||||
if (isset($vars['tab'])) {
|
||||
$routeParams[] = $vars['tab'];
|
||||
unset($vars['tab']);
|
||||
|
Reference in New Issue
Block a user