Skip to content

Commit

Permalink
[widget] Top Devices (#13748)
Browse files Browse the repository at this point in the history
* count only UP ports

* ci
  • Loading branch information
Npeca75 committed Feb 12, 2022
1 parent 978cd75 commit c7b63b5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/Http/Controllers/Widgets/TopDevicesController.php
Expand Up @@ -196,6 +196,7 @@ private function getTrafficData($sort)
}, function ($query) {
return $query->has('device');
})
->where('ifOperStatus', 'up')
->orderByRaw('SUM(ifInOctets_rate + ifOutOctets_rate) ' . $sort)
->limit($settings['device_count']);

Expand Down

0 comments on commit c7b63b5

Please sign in to comment.