{{ __('capacity.title') }}

{{ __('capacity.subtitle') }}

{{-- ── The queue ────────────────────────────────────────────────────── --}}

{{ __('capacity.queue_title') }}

@if ($demand['count'] > 0) {{ trans_choice('capacity.queue_count', $demand['count'], ['count' => $demand['count']]) }} @else {{ __('capacity.queue_empty_badge') }} @endif {{ __('capacity.recheck') }}
@if ($demand['count'] === 0)

{{ __('capacity.queue_empty') }}

@else @foreach ($parked as $entry) @php // Only hosts in the order's own datacenter: placement // is a per-datacenter question, and the step refuses a // pin from anywhere else. Offering one here would be // offering a choice that silently does nothing. $choices = $hosts->where('datacenter', $entry['datacenter']); $pinnedHost = $entry['pinned_host_id'] === null ? null : $choices->firstWhere('id', $entry['pinned_host_id']); @endphp {{-- One select, one value, no height change: the row stays a row (R20's exception), and the decision is the operator's — the placement rule only takes over again when nothing is chosen. --}} @endforeach
{{ __('capacity.col_customer') }} {{ __('capacity.col_plan') }} {{ __('capacity.col_needs') }} {{ __('capacity.col_datacenter') }} {{ __('capacity.col_waiting') }} {{ __('capacity.col_target') }}
{{ $entry['order']->customer?->name ?? '—' }} {{ $entry['name'] }} {{ $entry['needs'] }} GB {{ $entry['datacenter'] }} {{ $entry['waiting_since']->local()->diffForHumans() }} @if ($pinnedHost !== null && ! $pinnedHost->canTake($entry['needs'])) {{-- A pin is honoured or it waits — never quietly redirected. So say so, or the row sits there looking like every other one while it is the choice, not the estate, that is holding it up. --}}

{{ __('capacity.target_too_small') }}

@endif
{{-- What to buy, in numbers. The largest single package decides the MINIMUM machine — an instance lives on one host, so a server that cannot take the biggest one leaves it parked however much total space it has. --}}

{{ __('capacity.needed_title') }}

{{ __('capacity.needed_body', [ 'mix' => collect($demand['by_plan'])->map(fn ($n, $plan) => $n.'× '.$plan)->join(', '), 'largest' => $demand['largest'], 'total' => $demand['total'], ]) }}

@endif
{{-- ── What the estate can still take ───────────────────────────────── --}} @if ($hosts->isEmpty())

{{ __('capacity.hosts_empty') }}

@else @foreach ($hosts as $host) @endforeach
{{ $host->name }} {{ $host->datacenter }} {{ $host->availableGb() }} / {{ $host->freeGb() }} GB {{ __('capacity.free') }}
@endif @if ($unplaceable !== []) {{ __('capacity.unsellable', [ 'plans' => collect($unplaceable)->pluck('name')->join(', '), ]) }} @endif
{{-- ── What such a machine costs today ──────────────────────────────── --}} @if ($demand['count'] > 0)

{{ __('capacity.market_body', ['gb' => $demand['largest']]) }}

@if ($offers === [])

{{ __('capacity.market_none') }}

@else @foreach ($offers as $offer) @endforeach
CPU RAM {{ __('capacity.col_disks') }} {{ __('capacity.col_usable') }} {{ __('capacity.col_location') }} {{ __('capacity.col_price') }}
{{ $offer['cpu'] }} {{ $offer['ram'] }} GB {{ $offer['disks'] }} {{ number_format($offer['flash_gb'], 0, ',', '.') }} GB {{ $offer['datacenter'] }} {{ number_format($offer['price'], 2, ',', '.') }} €

{{ __('capacity.market_note') }}

@endif
@endif