mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix device overview port counts (#10254)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
if (\LibreNMS\Util\ObjectCache::portCounts(['total'])['total'] > 0) {
|
||||
use LibreNMS\Util\ObjectCache;
|
||||
|
||||
if (ObjectCache::portCounts(['total'], $device['device_id'])['total'] > 0) {
|
||||
echo '<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-default panel-condensed">
|
||||
@@ -45,7 +47,7 @@ if (\LibreNMS\Util\ObjectCache::portCounts(['total'])['total'] > 0) {
|
||||
echo ' </td>
|
||||
</tr>';
|
||||
|
||||
$ports = \LibreNMS\Util\ObjectCache::portCounts(['total', 'up', 'down', 'disabled']);
|
||||
$ports = ObjectCache::portCounts(['total', 'up', 'down', 'disabled'], $device['device_id']);
|
||||
echo '
|
||||
<tr>
|
||||
<td><i class="fa fa-link fa-lg" style="color:black" aria-hidden="true"></i> '.$ports['total'].'</td>
|
||||
|
||||
Reference in New Issue
Block a user