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:
Jellyfrog
2020-11-11 01:15:20 +01:00
committed by GitHub
parent ac5920f45c
commit cfd9dce620
24 changed files with 363 additions and 237 deletions

View File

@@ -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();
}
}