{{-- 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' => '
{{ __('proxmox.client.snapshots_hint') }}
{{ __('proxmox.client.backups_hint') }}