@extends('layouts.app') @section('title', $site->name) @php use Illuminate\Support\Str; @endphp @section('content')
@php $currentUser = auth()->user(); $canPurgeCache = $currentUser->isAdmin() || $site->assigned_to === $currentUser->id; $systemPlugins = is_array($site->system_plugins) ? $site->system_plugins : []; @endphp

Site Detay

@can('update', $site) @endcan

Site Bilgileri

@can('update', $site) Düzenle @endcan
Site Adı
{{ $site->name }}
URL
{{ $site->url }}
@php $wpAdminUrl = rtrim($site->url, '/') . '/wp-admin'; @endphp
WordPress Admin
{{ $wpAdminUrl }}
@if($site->language)
Dil
{{ $site->language }}
@endif @if($site->currency)
Para Birimi
{{ $site->currency }}
@endif @if (auth()->user()->isAdmin() && $site->assignedUser)
Atanan Geliştirici
{{ $site->assignedUser->name }}
@endif
Durum
{{ $site->status === 'active' ? 'Aktif' : 'Pasif' }}

Genel Durum

@php $wpAdminUrl = rtrim($site->url, '/') . '/wp-admin'; @endphp
WordPress Admin
{{ $wpAdminUrl }}
@if($site->wp_admin_login)
WordPress Kullanıcı Adı
{{ $site->wp_admin_login }}
@endif @if($site->wp_admin_email)
WordPress Email
{{ $site->wp_admin_email }}
@endif
Site Durumu
Aktif
@if(auth()->user()->isAdmin() && $site->products_count !== null)
Ürün Sayısı
{{ $site->products_count ?? 0 }}
@endif

Genel Durum

@if($site->ssh_host)
SSH Host
{{ $site->ssh_host }}
@endif @if($site->ssh_user)
SSH Kullanıcı
{{ $site->ssh_user }}
@endif @if($site->ssh_path)
Sunucu Dizini
{{ $site->ssh_path }}
@endif @if($site->api_secret)
API Secret
{{ Str::limit($site->api_secret, 20) }}
@endif
@php $gspConnectorInstalled = $site->isGspConnectorInstalled(); $gspConnectorVersion = $site->gsp_connector_version; $wooCommerceInstalled = $site->isWooCommerceInstalled(); @endphp @if(auth()->user()->isAdmin())

GSP Connector Durumu

GSP Connector @if($gspConnectorInstalled) Kurulu @else Kurulu Değil @endif

@if($gspConnectorInstalled && $gspConnectorVersion)

Versiyon: {{ $gspConnectorVersion }}

@endif
@if($canPurgeCache && !empty($site->api_secret))
@csrf
@endif
@if(!$gspConnectorInstalled) @php $hasSshCredentials = !empty($site->ssh_host) && !empty($site->ssh_user) && !empty($site->ssh_path); @endphp
@csrf
@if (!$hasSshCredentials)

SSH bilgileri eksik

@endif @endif

WooCommerce @if($wooCommerceInstalled) Kurulu @else Gerekli @endif

GSP Connector için WooCommerce zorunludur.

@if(!$wooCommerceInstalled) @php $hasSshCredentials = !empty($site->ssh_host) && !empty($site->ssh_user) && !empty($site->ssh_path); @endphp
@csrf
@if (!$hasSshCredentials)

SSH bilgileri eksik olduğu için eklenti kurulumu yapılamaz.

@endif @endif
@endif @if(auth()->user()->isAdmin())

Eklentiler

@if($canPurgeCache && !empty($site->api_secret))
@csrf
@endif
@if(!empty($systemPlugins))
@foreach(array_slice($systemPlugins, 0, 5) as $plugin) @endforeach
Ad Versiyon Durum
{{ $plugin['name'] ?? $plugin['slug'] ?? 'Bilinmeyen' }} {{ $plugin['version'] ?? '-' }} @php $status = $plugin['status'] ?? 'inactive'; $isActive = $status === 'active'; @endphp {{ $isActive ? 'Aktif' : 'Pasif' }}
@if(count($systemPlugins) > 5) @endif @else

Eklenti bilgisi bulunamadı

@if($canPurgeCache && !empty($site->api_secret))
@csrf
@endif
@endif
@endif
@php $brokenStatus = $site->broken_links_status ?? 'idle'; $brokenSummary = is_array($site->broken_link_summary) ? $site->broken_link_summary : null; $brokenCount = $brokenSummary['broken_count'] ?? ($brokenSummary['broken_links'] ?? [] ? count($brokenSummary['broken_links']) : null); $statusLabels = [ 'queued' => ['text' => 'Kuyrukta', 'class' => 'bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300'], 'processing' => ['text' => 'İşleniyor', 'class' => 'bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300'], 'completed' => ['text' => 'Tamamlandı', 'class' => 'bg-emerald-100 dark:bg-emerald-900/30 text-emerald-700 dark:text-emerald-300'], 'failed' => ['text' => 'Hata', 'class' => 'bg-rose-100 dark:bg-rose-900/30 text-rose-700 dark:text-rose-300'], ]; $statusMeta = $statusLabels[$brokenStatus] ?? ['text' => 'Hazır', 'class' => 'bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300']; @endphp

Kırık Link Analizi Durumu

{{ $statusMeta['text'] }} @if ($site->broken_links_last_dispatched_at) Kuyruğa alındı: {{ $site->broken_links_last_dispatched_at->format('d.m.Y H:i') }} @endif @if ($site->last_broken_link_check_at) Son sonuç: {{ $site->last_broken_link_check_at->format('d.m.Y H:i') }} @endif
{{ $site->broken_links_progress ?? 0 }}%
{{ $site->broken_links_checked_pages ?? 0 }} sayfa kontrol edildi
@if (!is_null($brokenCount))
{{ $brokenCount }} kırık link
@endif Detay
@if (session('broken_links'))

Kırık Link Raporu

{{ session('broken_links_count', count(session('broken_links', []))) }} hata bulundu

Son site analizi sırasında aşağıdaki iç linkler 404 veya benzeri hatalar döndürdü. Lütfen içerikleri güncelleyerek bağlantıları düzeltin.

    @foreach (session('broken_links') as $link)
  • {{ $link['url'] ?? '-' }} {{ $link['status'] ?? 'hata' }}
    @if (!empty($link['referrer'])) Bulunduğu sayfa: {{ $link['referrer'] }} @endif @if (!empty($link['message'])) Yanıt: {{ $link['message'] }} @endif
  • @endforeach
@endif
@if(auth()->user()->isAdmin()) @include('sites.partials.seo-meta-form', ['site' => $site]) @endif
İçerikler
{{ $site->contents_count ?? 0 }}
Görüntüle →
Medya
{{ $site->media_count ?? 0 }}
Görüntüle →
UI Tasarımları
{{ $site->ui_designs_count ?? 0 }}
Görüntüle →
@if(auth()->user()->isAdmin())
Ürünler
{{ $site->products_count ?? 0 }}
Görüntüle →
@endif @if (!empty($site->api_secret)) @php $summarySystemPlugins = is_array($site->system_plugins) ? $site->system_plugins : []; $summaryPluginsWithUpdates = collect($summarySystemPlugins) ->filter(fn($plugin) => !empty($plugin['update_available'])) ->count(); $summarySystemInfoSyncedAt = $site->system_info_synced_at; @endphp
WP Sistem Bilgileri
@if ($summaryPluginsWithUpdates > 0) {{ $summaryPluginsWithUpdates }} güncelleme bekliyor @else Güncel @endif

Son kontrol: @if ($summarySystemInfoSyncedAt) {{ $summarySystemInfoSyncedAt->format('d.m.Y H:i') }} @else Henüz senkronize edilmedi @endif

Detayları Gör →
Aktif Sayfalar
@if ($wpPagesError) Hata @else {{ $wpPagesCount }} @endif
@if (!empty($wpPagesCachedAt))

Önbelleğe alınan veri: {{ optional($wpPagesCachedAt)->timezone(config('app.timezone'))->format('d.m.Y H:i') }}

@endif @if ($wpPagesError) API Hatası @else @endif
@endif
@php $healthScore = $site->health_score; $overallScore = $healthScore['overall_score'] ?? null; $healthLevel = $healthScore['health_level'] ?? 'unknown'; $healthColor = $healthScore['health_color'] ?? 'gray'; $colorClasses = [ 'green' => 'bg-green-500 text-green-50 ring-green-200', 'lime' => 'bg-lime-500 text-lime-50 ring-lime-200', 'yellow' => 'bg-yellow-500 text-yellow-50 ring-yellow-200', 'orange' => 'bg-orange-500 text-orange-50 ring-orange-200', 'red' => 'bg-red-500 text-red-50 ring-red-200', 'gray' => 'bg-gray-500 text-gray-50 ring-gray-200', ]; $levelLabels = [ 'excellent' => 'Mükemmel', 'good' => 'İyi', 'fair' => 'Orta', 'poor' => 'Zayıf', 'critical' => 'Kritik', 'unknown' => 'Bilinmiyor', ]; $ringColor = $healthColor === 'green' ? 'ring-green-500' : ($healthColor === 'red' ? 'ring-red-500' : ($healthColor === 'orange' ? 'ring-orange-500' : 'ring-gray-500')); @endphp

Site Sağlık Skoru

@if($overallScore !== null)
@php $circumference = 2 * M_PI * 56; $offset = $circumference * (1 - $overallScore / 100); $colorMap = [ 'green' => '#10b981', 'lime' => '#84cc16', 'yellow' => '#eab308', 'orange' => '#f97316', 'red' => '#ef4444', 'gray' => '#6b7280', ]; $textColorMap = [ 'green' => 'text-green-600', 'lime' => 'text-lime-600', 'yellow' => 'text-yellow-600', 'orange' => 'text-orange-600', 'red' => 'text-red-600', 'gray' => 'text-gray-600', ]; $strokeColor = $colorMap[$healthColor] ?? $colorMap['gray']; $textColorClass = $textColorMap[$healthColor] ?? $textColorMap['gray']; @endphp
{{ number_format($overallScore, 0) }}
{{ $levelLabels[$healthLevel] ?? 'Bilinmiyor' }}
@foreach($healthScore['categories'] ?? [] as $category => $data) @if($data['score'] !== null) @php $catColors = [ 'performance' => 'bg-lime-500', 'broken_links' => 'bg-rose-500', 'security' => 'bg-purple-500', 'system' => 'bg-blue-500', 'status' => 'bg-gray-500', ]; $catLabels = [ 'performance' => 'Performans', 'broken_links' => 'Kırık Linkler', 'security' => 'Güvenlik', 'system' => 'Sistem', 'status' => 'Durum', ]; @endphp
{{ $catLabels[$category] ?? ucfirst($category) }}
{{ number_format($data['score'], 0) }}
@endif @endforeach
@if(!empty($healthScore['issues']) || !empty($healthScore['recommendations']))
@if(!empty($healthScore['issues'])) @foreach(array_slice($healthScore['issues'], 0, 3) as $issue)
{{ $issue['message'] }}
@endforeach @endif @if(!empty($healthScore['recommendations'])) @foreach(array_slice($healthScore['recommendations'], 0, 2) as $recommendation)
{{ $recommendation }}
@endforeach @endif
@endif @else

Sağlık skoru hesaplanamadı

@endif

Detaylı Bilgiler

@if ($canPurgeCache && !empty($site->api_secret))
@csrf
@csrf
@csrf
@endif
WordPress Sürümü
{{ $site->wp_version ?? 'Veri Yok' }}
SSL/HTTPS
{{ $site->is_ssl_active ? 'Aktif' : 'Pasif' }}
Son Analiz
{{ $site->last_analyzed_at ? $site->last_analyzed_at->diffForHumans() : 'Hiç yapılmadı' }}
Kırık Link Durumu
{{ $statusMeta['text'] }} @if (!is_null($brokenCount)) {{ $brokenCount }} kırık link @endif @if ($brokenSummary && isset($brokenSummary['checked_count'])) {{ $brokenSummary['checked_count'] }} sayfa tarandı @endif
Başarısız Giriş Denemeleri
{{ $site->failed_logins ?? 0 }}
@php $sslDays = $site->ssl_days_remaining; if (is_null($sslDays) && $site->ssl_expiry_date) { $sslDays = now()->diffInDays($site->ssl_expiry_date, false); } $sslBadge = 'bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300'; if (!is_null($sslDays)) { if ($sslDays <= 0) { $sslBadge = 'bg-rose-100 dark:bg-rose-900/30 text-rose-700 dark:text-rose-300'; } elseif ($sslDays <= 14) { $sslBadge = 'bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300'; } else { $sslBadge = 'bg-emerald-100 dark:bg-emerald-900/30 text-emerald-700 dark:text-emerald-300'; } } @endphp
SSL Sertifika Bitişi
@if ($site->ssl_expiry_date) {{ $site->ssl_expiry_date->format('d.m.Y H:i') }} @else Bilinmiyor @endif @if (is_null($sslDays)) Bilgi yok @elseif ($sslDays <= 0) Süresi doldu @else {{ $sslDays }} gün kaldı @endif

SSH Komut Geçmişi

Son 10 SSH/WP-CLI komut çalıştırma kaydı

@if($sshLogs->isEmpty())

Henüz SSH komut kaydı bulunmuyor.

@else
@foreach($sshLogs as $index => $log) @if($log->stdout || $log->stderr) @endif @endforeach
Komut Türü Komut Durum Kullanıcı Tarih Çıktı/Hata
{{ $log->command_type }} {{ Str::limit($log->full_command, 80) }} @if($log->exit_code === 0) Başarılı @else Hata ({{ $log->exit_code }}) @endif {{ $log->user->name ?? 'Bilinmiyor' }} {{ $log->created_at->format('d.m.Y H:i') }} @if($log->stdout || $log->stderr) @else - @endif
@endif

Sitemap Bilgileri

@if ($canPurgeCache && !empty($site->api_secret))
@csrf
@csrf
Agent Geçmişi @endif @if ($currentUser->isAdmin())
@csrf
@endif
Sitemap Durumu
@if ($site->sitemap_status === 'Bulundu') {{ $site->sitemap_status }} @elseif($site->sitemap_status === 'Bulunamadı') {{ $site->sitemap_status }} @else {{ $site->sitemap_status ?? 'Veri Yok' }} @endif
Sayfa Sayısı
{{ $site->page_count ?? 0 }}
@if(isset($wpMedia) && count($wpMedia) > 0)

WordPress Görselleri

WordPress'te yüklenen görseller ({{ count($wpMedia) }})

@if(isset($wpMediaError))

{{ $wpMediaError }}

@endif
@foreach($wpMedia as $item)
@if(isset($item['thumbnail_url']) && !empty($item['thumbnail_url'])) {{ $item['title'] ?? $item['filename'] ?? '' }} @elseif(isset($item['url']) && !empty($item['url']) && (isset($item['mime_type']) && str_contains($item['mime_type'], 'image'))) {{ $item['title'] ?? $item['filename'] ?? '' }} @else
@endif

{{ $item['title'] ?? $item['filename'] ?? 'İsimsiz' }}

@if(isset($item['file_size_formatted'])) {{ $item['file_size_formatted'] }} @elseif(isset($item['file_size'])) {{ number_format($item['file_size'] / 1024, 2) }} KB @else - @endif

@if(isset($item['url'])) Görüntüle @endif
@endforeach
@elseif(isset($wpMediaError) && !empty($wpMediaError))

WordPress Görselleri

{{ $wpMediaError }}

@endif @if(auth()->user()->isAdmin())
@php $verifiedCount = $site->products ->filter(function ($p) { return $p->isAllMediaVerified(); }) ->count(); @endphp @if ($site->products->count() > 0 && !empty($site->api_secret)) @endif @if ($verifiedCount > 0) Toplu CSV İndir @endif @if (auth()->user()->isAdmin()) Yeni Ürün Ekle @endif
@if (!empty($wpProductsError))

{{ $wpProductsError }}

@endif @if (!empty($wpProducts) && is_array($wpProducts) && count($wpProducts) > 0)

WordPress'ten Çekilen Ürünler ({{ count($wpProducts) }})

@if (!empty($wpProductsCachedAt))

Önbelleğe alınan veri: {{ optional($wpProductsCachedAt)->timezone(config('app.timezone'))->format('d.m.Y H:i') }}

@endif
Yenile @if (auth()->user()->isAdmin()) @endif
@foreach ($wpProducts as $wpProduct) @endforeach
Ürün Adı SKU Fiyat Durum İşlemler
{{ !empty($wpProduct['name']) ? $wpProduct['name'] : '-' }} {{ !empty($wpProduct['sku']) ? $wpProduct['sku'] : '-' }} @php $salePrice = !empty($wpProduct['sale_price']) ? (float) $wpProduct['sale_price'] : null; $regularPrice = !empty($wpProduct['regular_price']) ? (float) $wpProduct['regular_price'] : 0; @endphp @if ($salePrice && $salePrice > 0)
{{ number_format($salePrice, 2) }} ₺ @if ($regularPrice > 0) {{ number_format($regularPrice, 2) }} ₺ @endif
@elseif($regularPrice > 0) {{ number_format($regularPrice, 2) }} ₺ @else - @endif
@php $status = $wpProduct['status'] ?? 'N/A'; $statusClass = $status === 'publish' ? 'bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-300' : 'bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-300'; @endphp {{ $status }} @if (auth()->user()->isAdmin()) @php $wpProductId = $wpProduct['id'] ?? null; $wpSku = !empty($wpProduct['sku']) ? addslashes($wpProduct['sku']) : ''; $wpProductJson = htmlspecialchars( json_encode( $wpProduct, JSON_HEX_APOS | JSON_HEX_QUOT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE, ), ENT_QUOTES, 'UTF-8', ); @endphp @if ($wpProductId)
@else ID Yok @endif @endif
@elseif(!empty($site->api_secret) && empty($wpProductsError))

WordPress'te ürün bulunamadı veya API bağlantısı kurulamadı.

@endif @if (!empty($wpProductsError))

{{ $wpProductsError }}

@endif @if (auth()->user()->isAdmin()) @endif @if ($site->products->count() > 0)
@foreach ($site->products as $product) @endforeach
Ürün Adı SKU Fiyat Ürün Linki CSV Görsel Durumu İşlemler
{{ $product->name }} @if ($product->isSyncedToWordPress()) WP @else WP @endif
{{ $product->sku ?? '-' }} @if ($product->sale_price) {{ number_format($product->sale_price, 2) }} ₺ {{ number_format($product->regular_price ?? 0, 2) }} ₺ @else {{ number_format($product->regular_price ?? 0, 2) }} ₺ @endif @if (auth()->user()->isAdmin())
@csrf @method('PATCH')
@else @if ($product->product_link) {{ Str::limit($product->product_link, 30) }} @else - @endif @endif
@if ($product->isAllMediaVerified())
@else - @endif
@if ($product->isAllMediaVerified()) Hazır @else Beklemede @endif
@if (auth()->user()->isDeveloper()) Doğrula @else Görüntüle
@csrf @method('DELETE')
@endif
@else

Bu site için henüz ürün eklenmemiş.

@if (auth()->user()->isAdmin()) İlk Ürünü Ekle @endif
@endif
@endif @push('scripts') @endpush
@endsection @push('scripts') @endpush