mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix more divide by zero issues (#14954)
* Fix more divide by zero issues fixes: 14932 * Round to the nearest integer, then cast * Fix up dhcpatriot
This commit is contained in:
@@ -30,6 +30,7 @@ use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\View\View;
|
||||
use LibreNMS\Config;
|
||||
use LibreNMS\Util\Number;
|
||||
|
||||
class GlobeController extends WidgetController
|
||||
{
|
||||
@@ -104,7 +105,7 @@ class GlobeController extends WidgetController
|
||||
$location->lat,
|
||||
$location->lng,
|
||||
$location->location,
|
||||
(1 - $up / $count) * 100, // percent down
|
||||
Number::calculatePercent($count - $up, $count), // percent down
|
||||
$count,
|
||||
$down_items->implode(',<br/> '),
|
||||
]);
|
||||
|
Reference in New Issue
Block a user