feat: refactor VM add/edit forms to include vCenter selection, host component, and new VM information fields.

This commit is contained in:
pbao9
2026-02-14 16:57:13 +07:00
parent 498a57b499
commit d683afc901
6 changed files with 204 additions and 120 deletions
@@ -10,6 +10,8 @@ if (!$selectedDatacenterId && $model) {
$selectedDatacenterId = $model->host?->module_datacenter_id;
} elseif ($model instanceof \App\Models\ModuleIpAddress) {
$selectedDatacenterId = $model->host?->module_datacenter_id;
} elseif ($model instanceof \App\Models\VirtualMachines) {
$selectedDatacenterId = $model->datacenter_id;
} elseif (isset($model->module_datacenter_id)) {
$selectedDatacenterId = $model->module_datacenter_id;
} elseif (method_exists($model, 'host') && $model->host) {