mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
More cleanups (#12715)
* PHPDoc * Replace Auth > Illuminate\Support\Facades\Auth * Return inside when() * use str_replace correct * Misc * dead code * use int $port * styleci
This commit is contained in:
@@ -46,7 +46,6 @@ class ServerStatsController extends WidgetController
|
||||
return $settings['title'];
|
||||
}
|
||||
|
||||
/** @var Device $device */
|
||||
$device = Device::hasAccess($request->user())->find($settings['device']);
|
||||
if ($device) {
|
||||
return $device->displayName() . ' Stats';
|
||||
@@ -63,7 +62,6 @@ class ServerStatsController extends WidgetController
|
||||
return $this->getSettingsView($request);
|
||||
}
|
||||
|
||||
/** @var Device $device */
|
||||
$device = Device::hasAccess($request->user())->find($data['device']);
|
||||
if ($device) {
|
||||
$data['cpu'] = $device->processors()->avg('processor_usage');
|
||||
|
||||
Reference in New Issue
Block a user