mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Convert Virtual Machine pages to Laravel (#12287)
* Convert Virtual Machine pages to Laravel * wip * wip * wip * wip * wip * wip * delete * wip * wip * move powerStateLabel
This commit is contained in:
@@ -51,6 +51,17 @@ class VmInfoController implements DeviceTab
|
||||
|
||||
public function data(Device $device): array
|
||||
{
|
||||
return [];
|
||||
return [
|
||||
'vms' => self::getVms($device),
|
||||
];
|
||||
}
|
||||
|
||||
private static function getVms(Device $device)
|
||||
{
|
||||
return $device->vmInfo()
|
||||
->select('vmwVmDisplayName', 'vmwVmState', 'vmwVmGuestOS', 'vmwVmMemSize', 'vmwVmCpus')
|
||||
->with('parentDevice')
|
||||
->orderBy('vmwVmDisplayName')
|
||||
->get();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user