@php
$totalCores = $coreUsage['total'];
$usedCores = $infrastruktur->used_cores ?? [];
$warnaCores = ['Merah', 'Kuning', 'Hijau', 'Biru', 'Putih', 'Hitam', 'Orange', 'Coklat', 'Abu-abu', 'Pink', 'Ungu', 'Aqua'];
@endphp
@for($core = 1; $core <= $totalCores; $core++)
@php
$isUsed = in_array($core, $usedCores);
$warnaIndex = ($core - 1) % count($warnaCores);
$warna = $warnaCores[$warnaIndex];
@endphp
Core {{ $core }}
@if($isUsed)
@else
@endif
{{ $warna }}
@if($isUsed)
Terpakai
@else
Tersedia
@endif
@endfor