feat: Implement VM console with dedicated layout, WMKS integration, and jQuery 3 compatibility.

This commit is contained in:
pbao9
2026-03-02 00:27:18 +07:00
parent 1cfcaee871
commit 2c8c3d14cd
7 changed files with 137 additions and 15 deletions
+25
View File
@@ -0,0 +1,25 @@
<?php
require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
$app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap();
$vCenter = app(\App\Http\Services\vCenter::class);
$vm = \App\Models\VirtualMachines::with('datacenter.vCenter')->first();
if (!$vm) {
echo "No VM found\n";
exit;
}
$vcenter_model = $vm->datacenter->vCenter;
echo "Logging in to vCenter: " . $vcenter_model->host . "\n";
$loggedIn = $vCenter->loginServer($vcenter_model);
if (!$loggedIn) {
echo "Failed to login to vCenter\n";
exit;
}
echo "Logged in successfully\n";
$ticket = $vCenter->GetConsoleTickets($vm->vm_id);
print_r($ticket);