diff --git a/includes/html/pages/device/overview/ports.inc.php b/includes/html/pages/device/overview/ports.inc.php index f30553b1e0..8c5b3bb1b0 100644 --- a/includes/html/pages/device/overview/ports.inc.php +++ b/includes/html/pages/device/overview/ports.inc.php @@ -1,6 +1,8 @@ 0) { +use LibreNMS\Util\ObjectCache; + +if (ObjectCache::portCounts(['total'], $device['device_id'])['total'] > 0) { echo '
@@ -45,7 +47,7 @@ if (\LibreNMS\Util\ObjectCache::portCounts(['total'])['total'] > 0) { echo ' '; - $ports = \LibreNMS\Util\ObjectCache::portCounts(['total', 'up', 'down', 'disabled']); + $ports = ObjectCache::portCounts(['total', 'up', 'down', 'disabled'], $device['device_id']); echo ' '.$ports['total'].'