update layout control vm
This commit is contained in:
@@ -3,6 +3,12 @@
|
||||
$vmStatus = $vmInfo['status'] ?? null;
|
||||
$isPoweredOn = $vmStatus == 'POWERED_ON';
|
||||
$isPoweredOff = $vmStatus == 'POWERED_OFF';
|
||||
$isWindows =
|
||||
\Illuminate\Support\Str::contains(\Illuminate\Support\Str::lower($vmInfo['os'] ?? ''), 'windows') ||
|
||||
\Illuminate\Support\Str::contains(
|
||||
\Illuminate\Support\Str::lower($invoice->invoiceItem->first()?->os?->osGroup?->name ?? ''),
|
||||
'windows',
|
||||
);
|
||||
@endphp
|
||||
|
||||
<div class="bg-white rounded-lg shadow-lg p-6 mb-6">
|
||||
@@ -19,13 +25,15 @@
|
||||
<div class="grid grid-cols-6 gap-4">
|
||||
{{-- Row 1: Basic Controls --}}
|
||||
@include('frontend.service.partials.control-buttons.renewal-button')
|
||||
{{ $vmInfo }}
|
||||
{{-- Debug info removed - was causing htmlspecialchars error --}}
|
||||
|
||||
@if ($isPoweredOff)
|
||||
@include('frontend.service.partials.control-buttons.start-button')
|
||||
@elseif ($isPoweredOn)
|
||||
@include('frontend.service.partials.control-buttons.restart-button')
|
||||
@include('frontend.service.partials.control-buttons.reset-remote-button')
|
||||
@if ($isWindows)
|
||||
@include('frontend.service.partials.control-buttons.reset-remote-button')
|
||||
@endif
|
||||
@include('frontend.service.partials.control-buttons.stop-button')
|
||||
@include('frontend.service.partials.control-buttons.console-button', ['invoice' => $invoice])
|
||||
@endif
|
||||
@@ -35,10 +43,9 @@
|
||||
|
||||
@if ($isPoweredOn)
|
||||
@include('frontend.service.partials.control-buttons.snapshot-button')
|
||||
@include('frontend.service.partials.control-buttons.reset-password-button')
|
||||
@endif
|
||||
|
||||
|
||||
{{-- @include('frontend.service.partials.control-buttons.reset-password-button') --}}
|
||||
</div>
|
||||
|
||||
{{-- Notes Section --}}
|
||||
@@ -47,5 +54,13 @@
|
||||
'productId' => $invoice->invoiceItem->first()?->getProductAttribute()?->id,
|
||||
'invoiceId' => $invoice->id,
|
||||
])
|
||||
@if ($isPoweredOn)
|
||||
@include('frontend.service.partials.snapshots-modal', ['invoice' => $invoice])
|
||||
@include('frontend.service.partials.reset-password-modal', [
|
||||
'invoice' => $invoice,
|
||||
'isWindows' => $isWindows,
|
||||
])
|
||||
@include('frontend.service.partials.change-remote-port-modal', ['invoice' => $invoice])
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user