add in/out erros to port table (#16073)

This commit is contained in:
Michael
2024-07-26 16:09:38 +02:00
committed by GitHub
parent b41d1b7ffb
commit 9f4e6cbf01
2 changed files with 11 additions and 1 deletions

View File

@@ -86,6 +86,8 @@ class PortsController extends TableController
'ifDescr',
'secondsIfLastChange',
'ifConnectorPresent',
'ifInErrors',
'ifOutErrors',
'ifInErrors_delta',
'ifOutErrors_delta',
'ifInOctets_rate',
@@ -168,6 +170,8 @@ class PortsController extends TableController
'ifOutOctets_rate' => $port->ifOutOctets_rate * 8,
'ifInUcastPkts_rate' => $port->ifInUcastPkts_rate,
'ifOutUcastPkts_rate' => $port->ifOutUcastPkts_rate,
'ifInErrors' => $port->ifInErrors,
'ifOutErrors' => $port->ifOutErrors,
'ifInErrors_delta' => $port->poll_period ? Number::formatSi($port->ifInErrors_delta / $port->poll_period, 2, 3, 'EPS') : '',
'ifOutErrors_delta' => $port->poll_period ? Number::formatSi($port->ifOutErrors_delta / $port->poll_period, 2, 3, 'EPS') : '',
'ifType' => Rewrite::normalizeIfType($port->ifType),

View File

@@ -58,9 +58,15 @@ if (isset($vars['errors'])) {
Packets Out
</th>
<th data-column-id="ifInErrors_delta" data-searchable="false" data-visible="<?php echo $errors_visible ?>"
data-css-class="red"<?php echo $error_sort ?>>Errors In
data-css-class="red"<?php echo $error_sort ?>>Errors In Rate
</th>
<th data-column-id="ifOutErrors_delta" data-searchable="false" data-visible="<?php echo $errors_visible ?>"
data-css-class="red">Errors Out Rate
</th>
<th data-column-id="ifInErrors" data-searchable="false" data-visible="<?php echo $errors_visible ?>"
data-css-class="red"<?php echo $error_sort ?>>Errors In
</th>
<th data-column-id="ifOutErrors" data-searchable="false" data-visible="<?php echo $errors_visible ?>"
data-css-class="red">Errors Out
</th>
<th data-column-id="ifType">Media</th>