@if (!empty($error))
{{ $error }}
@elseif ($sensors->isEmpty())
{{ __('No health sensors matched the current filters.') }}
@else @php($colWidth = max(1, min(12, intdiv(12, max(1, (int) ($cols ?? 3))))))
@foreach ($sensors as $row) @php($sensor = $row['sensor']) @php($status = $row['status'] ?? 'unknown') @php($deviceUrl = route('device', ['device' => $sensor->device_id])) @php($graphUrl = url('graphs/id=' . $sensor->sensor_id . '/type=sensor_' . $sensor->sensor_class . '/') ) @php($graphType = 'sensor_' . $sensor->sensor_class) @php($graphVars = ['id' => $sensor->sensor_id]) @if ($display_mode === 'progress-bar') @php($value = is_numeric($sensor->sensor_current) ? (float) $sensor->sensor_current : null) @php($min = is_numeric($row['gauge_min'] ?? null) ? (float) $row['gauge_min'] : 0.0) @php($max = is_numeric($row['gauge_max'] ?? null) ? (float) $row['gauge_max'] : 1.0) @php($range = max(0.000001, $max - $min)) @php($pct = $value === null ? 0.0 : max(0.0, min(100.0, (($value - $min) / $range) * 100.0))) @php($barColor = match ($status) { 'critical' => 'tw:bg-red-600', 'warning' => 'tw:bg-amber-500', default => 'tw:bg-green-600', })
@elseif ($display_mode === 'gauge')
@elseif ($display_mode === 'graph')
@else
@endif @endforeach
@if ($display_mode === 'gauge') @endif @endif