Files
portal-api/resources/views/frontend/service/partials/vm-control-panel.blade.php
T
2025-08-10 20:24:23 +07:00

52 lines
2.1 KiB
PHP

{{-- VM Control Panel Partial - Optimized with reusable components --}}
@php
$vmStatus = $vmInfo['status'] ?? null;
$isPoweredOn = $vmStatus == 'POWERED_ON';
$isPoweredOff = $vmStatus == 'POWERED_OFF';
@endphp
<div class="bg-white rounded-lg shadow-lg p-6 mb-6">
<h2 class="text-xl font-semibold text-gray-800 mb-6 flex items-center">
<svg class="w-5 h-5 mr-2 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 100 4m0-4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 100 4m0-4v2m0-6V4">
</path>
</svg>
{{ __('Điều khiển VM') }}
</h2>
{{-- VM Control Grid --}}
<div class="grid grid-cols-6 gap-4">
{{-- Row 1: Basic Controls --}}
@include('frontend.service.partials.control-buttons.renewal-button')
{{ $vmInfo }}
@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')
@include('frontend.service.partials.control-buttons.stop-button')
@include('frontend.service.partials.control-buttons.console-button', ['invoice' => $invoice])
@endif
{{-- @include('frontend.service.partials.control-buttons.config-button') --}}
@include('frontend.service.partials.control-buttons.reinstall-button')
@if ($isPoweredOn)
@include('frontend.service.partials.control-buttons.snapshot-button')
@endif
{{-- @include('frontend.service.partials.control-buttons.reset-password-button') --}}
</div>
{{-- Notes Section --}}
@include('frontend.service.partials.control-notes')
@livewire('v-p-s-reinstall-modal', [
'productId' => $invoice->invoiceItem->first()?->getProductAttribute()?->id,
'invoiceId' => $invoice->id,
])
</div>
</div>