feat: Implement asynchronous VM power operations and refactor vCenter snapshot retrieval to use API calls.

This commit is contained in:
pbao9
2026-01-27 16:35:42 +07:00
parent bfb5f9f4a5
commit 057ba58760
16 changed files with 2869 additions and 2521 deletions
-25
View File
@@ -115,22 +115,6 @@ class VPSReinstallModal extends Component
// Try to get IP from vCenter API first, fallback to database
$this->vpsIpAddress = $this->getIPFromVCenter() ?? $this->moduleVmware?->ipAddress?->ip ?? null;
// Debug ModuleVmware info
Log::info('ModuleVmware debug info', [
'invoice_item_id' => $this->invoiceItem->id,
'invoice_item_relid' => $this->invoiceItem->relid,
'invoice_item_type_id' => $this->invoiceItem->type_id,
'invoice_customer_id' => $this->invoice?->customer_id ?? 'null',
'module_vmware' => $this->moduleVmware ? 'found' : 'not_found',
'module_vmware_id' => $this->moduleVmware?->id ?? 'null',
'module_vmware_name' => $this->moduleVmware?->name ?? 'null',
'module_vmware_customer_id' => $this->moduleVmware?->customer_id ?? 'null',
'module_ip_address_id' => $this->moduleVmware?->module_ip_address_id ?? 'null',
'ip_address_relationship' => $this->moduleVmware?->ipAddress ? 'found' : 'not_found',
'ip_address_from_db' => $this->moduleVmware?->ipAddress?->ip ?? 'null',
'ip_address_from_vcenter' => $this->vpsIpAddress ?? 'null'
]);
} else {
Log::warning('InvoiceItem not found', [
'invoice_id' => $this->invoiceId,
@@ -139,15 +123,6 @@ class VPSReinstallModal extends Component
]);
}
}
Log::info('OS data loaded successfully', [
'product_id' => $productId,
'os_groups_count' => is_object($this->osGroups) ? $this->osGroups->count() : count($this->osGroups),
'current_os' => $this->currentOs ? $this->currentOs->id : null,
'module_vmware_id' => $this->moduleVmware ? $this->moduleVmware->id : null,
'ip_address' => $this->moduleVmware?->ipAddress?->ip ?? 'N/A'
]);
} catch (\Exception $e) {
Log::error('Error loading OS data', [
'product_id' => $productId,