feat: implement IP pool management module with CRUD operations and network integration
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Jobs\VirtualMachine\Provision;
|
||||
|
||||
use App\Jobs\Mail\Admin\AdminOrderNotificationJob;
|
||||
use App\Jobs\Mail\SendInformationVirtualMachine;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\ModuleVmware;
|
||||
@@ -112,6 +113,27 @@ class SendVmCredentialsEmailJob implements ShouldQueue
|
||||
'ip' => $vm->ip,
|
||||
'invoice_attached' => $invoicePdf !== null,
|
||||
]);
|
||||
|
||||
// Notify admin with VM credentials after successful provisioning
|
||||
$order = $vm->order;
|
||||
AdminOrderNotificationJob::dispatch([
|
||||
'customer_name' => trim($customer->firstname . ' ' . $customer->lastname),
|
||||
'customer_email' => $customer->email,
|
||||
'client_ip' => null,
|
||||
'order_num' => $order?->order_num ?? $order?->id ?? 'N/A',
|
||||
'product_name' => $orderItem?->getProductAttribute()?->name ?? 'Cloud VPS',
|
||||
'product_type' => 'Cloud VPS',
|
||||
'billing_cycle' => $this->billingLabel($months),
|
||||
'total' => $orderItem?->price ?? 0,
|
||||
'created_at' => $order?->created_at?->format('d/m/Y H:i:s') ?? now()->format('d/m/Y H:i:s'),
|
||||
'ip' => $vm->ip ?? '',
|
||||
'username' => $vm->user ?? '',
|
||||
'password' => $vm->plain_password ?? '',
|
||||
]);
|
||||
|
||||
Log::info('SendVmCredentialsEmailJob: admin notification dispatched', [
|
||||
'module_vmware_id' => $this->moduleVmwareId,
|
||||
]);
|
||||
}
|
||||
|
||||
public function failed(\Throwable $e): void
|
||||
|
||||
Reference in New Issue
Block a user