feat: Integrate L5-Swagger for API documentation and enhance VM synchronization to include host-level details.

This commit is contained in:
pbao9
2026-02-15 12:31:06 +07:00
parent eb123ba97c
commit ef53ea3207
19 changed files with 3040 additions and 13433 deletions
@@ -124,7 +124,7 @@ class VirtualMachineController extends Controller
{
$query = $this->virtualMachineRepository->filter(
$request->all(),
['datacenter'],
['datacenter', 'host'],
[],
['*'],
true
@@ -151,6 +151,9 @@ class VirtualMachineController extends Controller
->editColumn('datacenter.name', function ($d) {
return $d->datacenter ? $d->datacenter->name . ' - ' . $d->datacenter->datacenter_id : 'N/A';
})
->editColumn('host.name', function ($d) {
return $d->host ? $d->host->name . ' - ' . $d->host->host_id : 'N/A';
})
->rawColumns(['action', 'power_state'])
->make(true);
}