{{-- The virtual server panel (Proxmox). The customer's service page and the admin's service page draw this same component, so both see the same numbers, charts and controls; staff get a few extra rows at the end. Everything live comes from the JSON routes in $urls. --}} @props([ 'service', 'urls', 'admin' => false, 'features' => [], 'choices' => [], 'canChange' => false, ]) @php $has = fn (string $f) => in_array($f, $features, true); $confirmWord = \App\Http\Controllers\Client\VpsController::confirmationWord($service); $pveData = $service->module_data ?? []; $proxmoxUrl = null; if ($admin && ! empty($pveData['proxmox_vmid']) && $service->server?->hostname) { $proxmoxUrl = 'https://'.$service->server->hostname.':'.($service->server->port ?: 8006) .'/#v1:0:='.rawurlencode(($pveData['proxmox_type'] ?? 'qemu').'/'.$pveData['proxmox_vmid']); } $icon = [ 'start' => '', 'reboot' => '', 'shutdown' => '', 'stop' => '', 'reset' => '', 'camera' => '', 'backup' => '', 'reinstall' => '', 'key' => '', 'external' => '', 'copy' => '', ]; $svg = fn (string $name) => ''; $powerButtons = [ 'start' => '', 'reboot' => '', 'shutdown' => '', 'stop' => 'danger', 'reset' => 'danger', ]; @endphp
{{ __('proxmox.client.loading') }}
 
@if($has('power'))
@foreach($powerButtons as $action => $style) @endforeach
@endif
@unless($canChange)
{{ $admin ? __('proxmox.client.not_active') : __('proxmox.client.suspended_note') }}
@endunless
{{ __('proxmox.client.cpu') }}
…
 
{{ __('proxmox.client.memory') }}
…
 
{{ __('proxmox.client.disk') }}
…
 
{{ __('proxmox.client.uptime') }}
…
 
{{ __('proxmox.client.addresses') }}…
{{ __('proxmox.client.os') }}…
{{ __('proxmox.client.login') }}{{ $service->username ?: 'root' }}
{{ __('proxmox.client.password') }} @if($service->password) •••••••• @else - @endif
@if($admin)
{{ __('proxmox.admin.vm_where') }} {{ !empty($pveData['proxmox_vmid']) ? __('proxmox.admin.vm_where_value', ['vmid' => $pveData['proxmox_vmid'], 'node' => $pveData['proxmox_node'] ?? '-', 'type' => $pveData['proxmox_type'] ?? 'qemu']) : '-' }}
{{ __('proxmox.admin.pool_address') }} {{ !empty($pveData['pve_ipv4']) ? __('proxmox.admin.pool_address_value', ['address' => $pveData['pve_ipv4'].'/'.($pveData['pve_ipv4_prefix'] ?? ''), 'gateway' => $pveData['pve_ipv4_gateway'] ?? '']) : __('proxmox.admin.pool_address_none') }}
@endif
@if($proxmoxUrl) @endif
@if($has('graphs'))

{{ __('proxmox.client.usage_title') }}

@foreach(['hour', 'day', 'week', 'month', 'year'] as $tf) @endforeach
@foreach(['cpu' => 'cpu', 'mem' => 'memory', 'net' => 'chart_network', 'io' => 'chart_disk'] as $chart => $title)
{{ __('proxmox.client.'.$title) }}
@endforeach
@endif @if($has('snapshots') || $has('backups'))
@if($has('snapshots'))

{!! $svg('camera') !!}{{ __('proxmox.client.snapshots_title') }}

{{ __('proxmox.client.snapshots_hint') }}

  • {{ __('proxmox.client.loading') }}
@if($canChange)
@endif
@endif @if($has('backups'))

{!! $svg('backup') !!}{{ __('proxmox.client.backups_title') }}

{{ __('proxmox.client.backups_hint') }}

  • {{ __('proxmox.client.loading') }}
@if($canChange)
@endif
@endif
@endif @if($canChange && ($has('password') || $has('reinstall')))
@if($has('password'))

{!! $svg('key') !!}{{ __('proxmox.client.password_title') }}

{{ __('proxmox.client.password_hint') }}

@endif @if($has('reinstall'))

{!! $svg('reinstall') !!}{{ __('proxmox.client.reinstall_title') }}

{{ __('proxmox.client.reinstall_hint') }}

{{ __('proxmox.client.ssh_keys_hint') }}

@endif
@endif {{ $slot }}