Skip to content

Commit

Permalink
add in/out erros to port table (librenms#16073)
Browse files Browse the repository at this point in the history
  • Loading branch information
mib1185 authored Jul 26, 2024
1 parent b41d1b7 commit 9f4e6cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/Http/Controllers/Table/PortsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ protected function sortFields($request)
'ifDescr',
'secondsIfLastChange',
'ifConnectorPresent',
'ifInErrors',
'ifOutErrors',
'ifInErrors_delta',
'ifOutErrors_delta',
'ifInOctets_rate',
Expand Down Expand Up @@ -168,6 +170,8 @@ public function formatItem($port)
'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),
Expand Down
8 changes: 7 additions & 1 deletion includes/html/pages/ports/list.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,15 @@
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>
Expand Down

0 comments on commit 9f4e6cb

Please sign in to comment.