@can('create crm monitors') @endcan @scope('cell_name', $monitor) {{ $monitor->displayName() }} @endscope @scope('cell_performance', $monitor) @php $bars = (array) ($monitor->performance_bars ?? array_fill(0, 7, 0)); $max = max($bars) ?: 1; $width = 100; $height = 28; $gap = 2; $barWidth = ($width - ($gap * 6)) / 7; @endphp @endscope @scope('cell_last_status', $monitor) @php $statusClass = match($monitor->last_status) { 'up' => 'badge-success', 'down' => 'badge-error', 'slow' => 'badge-warning', default => 'badge-neutral', }; @endphp @endscope @scope('cell_last_response_time', $monitor) {{ $monitor->last_response_time !== null ? $monitor->last_response_time.' ms' : '—' }} @endscope @scope('cell_last_checked_at', $monitor) {{ $monitor->last_checked_at?->format('Y-m-d H:i') ?? '—' }} @endscope @scope('actions', $monitor)
@can('view crm monitors') @endcan @can('edit crm monitors') @endcan @can('delete crm monitors') @endcan
@endscope