Fix device overview port counts (#10254)

This commit is contained in:
Tony Murray
2019-05-23 09:58:43 -05:00
committed by GitHub
parent e9b3e258e8
commit c99f6afa9b

View File

@@ -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>