@extends('layouts.app') @section('title', $site->name . ' - AI Performans Agent') @section('content')

{{ $site->name }} - AI Performans Agent

{{ $site->url }}

@csrf
Geri
@if(session('success') || session('warning') || session('error'))
@foreach (['success' => 'emerald', 'warning' => 'amber', 'error' => 'rose'] as $type => $color) @if (session($type))
{{ session($type) }}
@endif @endforeach
@endif

Mobil Performans Odaklı Optimizasyon

Agent, mobil performans odaklı optimizasyon kararı verir ve uygular. AI, mobil FCP ve mobil skorları analiz ederek mobil için özel optimizasyonlar (görsel optimizasyonu, critical CSS, lazy loading, font optimizasyonu) önerebilir. Yeni performans analizi için lütfen manuel olarak "Performans Analizini Başlat" butonunu kullanın (cache'in yeniden oluşması için en az 10-15 dakika bekleyin).

KRİTİK UYARI

Şu anda optimizasyonlar sadece cache purge olarak uygulanıyor. Cache purge performansı ARTIRMAZ, sadece cache'i temizler. Bu yüzden performans KÖTÜLEŞEBİLİR çünkü cache temizlenince ilk yükleme yavaş olur. Gerçek mobil optimizasyonlar (görsel optimizasyonu, critical CSS, lazy loading, font optimizasyonu) ve LiteSpeed Cache optimizasyonları için GSP Connector eklentisinde ilgili metodların eklenmesi gerekmektedir.

Öneri

Mobil performans sorunları ciddi değilse (Mobil FCP < 2.5s VE Mobil Score >= 65), agent'i çalıştırmayın. Sadece ciddi mobil performans sorunlarında (Mobil FCP > 3.0s veya Mobil Score < 50) kullanın.

Toplam Çalıştırma

{{ $stats['total'] }}

Tüm zamanlar

Başarılı

{{ $stats['completed'] }}

@if($stats['total'] > 0) {{ round(($stats['completed'] / $stats['total']) * 100, 1) }}% başarı oranı @else Henüz veri yok @endif

Başarısız

{{ $stats['failed'] }}

@if($stats['total'] > 0) {{ round(($stats['failed'] / $stats['total']) * 100, 1) }}% hata oranı @else Henüz veri yok @endif

Çalışıyor

{{ $stats['running'] }}

@if($stats['running'] > 0) Aktif işlemler @else Beklemede @endif

@if(!$logs->isEmpty())
@endif

Çalıştırma Geçmişi

{{ $logs->total() }} kayıt
@if($logs->isEmpty())

Henüz performans agent çalıştırılmamış.

İlk çalıştırmayı başlatmak için yukarıdaki "Agent'i Başlat" butonuna tıklayın.

@else
@foreach($logs as $log)
{{ $log->created_at->format('d.m.Y H:i') }}
{{ $log->initiatedBy ? $log->initiatedBy->name : 'Sistem' }}
@if($log->status === 'running') @elseif($log->status === 'completed') @elseif($log->status === 'failed') @else @endif {{ ucfirst($log->status) }}
@if($log->action_taken)
@if($log->action_taken === 'MOBILE_IMAGE_OPTIMIZE') @elseif($log->action_taken === 'MOBILE_CSS_CRITICAL') @elseif($log->action_taken === 'MOBILE_LAZY_LOAD') @elseif($log->action_taken === 'MOBILE_FONT_OPTIMIZE') @elseif($log->action_taken === 'LS_CSS_MINIFY') @elseif($log->action_taken === 'LS_JS_DEFER') @elseif($log->action_taken === 'IMAGE_WEBP') @elseif($log->action_taken === 'UNUSED_CSS') @else @endif {{ $log->action_label }}
@endif @if($log->mobile_score || $log->desktop_score)
@if($log->mobile_score) @php $mobileChange = $log->mobile_score_change; @endphp
📱 Mobile:
{{ $log->mobile_score }}/100 @if($mobileChange) @php $isPositive = $mobileChange['points'] > 0; $isNegative = $mobileChange['points'] < 0; @endphp @if($isPositive) +{{ abs($mobileChange['points']) }} @elseif($isNegative) {{ $mobileChange['points'] }} @else @endif @endif
@if($log->mobile_fcp)
FCP: {{ $log->mobile_fcp }}s
@endif @endif @if($log->desktop_score) @php $desktopChange = $log->desktop_score_change; @endphp
🖥️ Desktop:
{{ $log->desktop_score }}/100 @if($desktopChange) @php $isPositive = $desktopChange['points'] > 0; $isNegative = $desktopChange['points'] < 0; @endphp @if($isPositive) +{{ abs($desktopChange['points']) }} @elseif($isNegative) {{ $desktopChange['points'] }} @else @endif @endif
@if($log->desktop_fcp)
FCP: {{ $log->desktop_fcp }}s
@endif @endif
@endif
@endforeach
{{ $logs->links() }}
@endif
@push('scripts') @endpush @endsection