@props(['settings' => [], 'sites' => collect(), 'totalSites' => 0, 'user' => null, 'stats' => []]) @php $queueSize = \Illuminate\Support\Facades\DB::table('jobs')->count(); $failedJobs = \Illuminate\Support\Facades\DB::table('failed_jobs')->count(); $securityAlerts = \App\Models\SecurityAlert::whereNull('resolved_at')->count(); $pluginUpdates = \App\Models\PluginUpdate::where('update_available', true)->count(); $healthScore = 100; if ($queueSize > 100) $healthScore -= 20; if ($failedJobs > 10) $healthScore -= 20; if ($securityAlerts > 5) $healthScore -= 20; if ($pluginUpdates > 20) $healthScore -= 20; $healthStatus = $healthScore >= 80 ? 'excellent' : ($healthScore >= 60 ? 'good' : ($healthScore >= 40 ? 'warning' : 'critical')); $healthColors = [ 'excellent' => ['bg' => 'bg-green-500', 'text' => 'text-green-600 dark:text-green-400'], 'good' => ['bg' => 'bg-blue-500', 'text' => 'text-blue-600 dark:text-blue-400'], 'warning' => ['bg' => 'bg-yellow-500', 'text' => 'text-yellow-600 dark:text-yellow-400'], 'critical' => ['bg' => 'bg-red-500', 'text' => 'text-red-600 dark:text-red-400'], ]; $healthLabels = [ 'excellent' => 'Mükemmel', 'good' => 'İyi', 'warning' => 'Uyarı', 'critical' => 'Kritik', ]; @endphp

Sistem Sağlığı

{{ $healthLabels[$healthStatus] }}
{{ $healthScore }}
Queue {{ number_format($queueSize) }}
Başarısız İşler {{ number_format($failedJobs) }}
Güvenlik Uyarıları {{ number_format($securityAlerts) }}
Plugin Güncellemeleri {{ number_format($pluginUpdates) }}