From c99f6afa9b9312d84cc2c3e9751ff263944a04f5 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Thu, 23 May 2019 09:58:43 -0500 Subject: [PATCH] Fix device overview port counts (#10254) --- includes/html/pages/device/overview/ports.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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'].'