@extends('layouts.app') @section('title', 'Dashboard') @section('content')

Dashboard

Mes Sites + Nouvelle analyse
@if($sites->isEmpty() && $analyses->isEmpty())

Aucun site ou analyse pour le moment

Créer un site Analyser un fichier de logs
@else @if($sites->isNotEmpty())

Mes Sites

@php $colorClasses = [ ['stat' => 'text-purple-600', 'badge' => 'bg-purple-100 text-purple-800'], ['stat' => 'text-indigo-600', 'badge' => 'bg-indigo-100 text-indigo-800'], ['stat' => 'text-cyan-600', 'badge' => 'bg-cyan-100 text-cyan-800'], ['stat' => 'text-pink-600', 'badge' => 'bg-pink-100 text-pink-800'], ['stat' => 'text-orange-600', 'badge' => 'bg-orange-100 text-orange-800'], ['stat' => 'text-emerald-600', 'badge' => 'bg-emerald-100 text-emerald-800'], ]; $gradientBorders = [ 'from-purple-200 via-indigo-200 to-cyan-200', 'from-pink-200 via-purple-200 to-indigo-200', 'from-cyan-200 via-blue-200 to-indigo-200', 'from-orange-200 via-pink-200 to-purple-200', 'from-emerald-200 via-cyan-200 to-blue-200', 'from-indigo-200 via-purple-200 to-pink-200', ]; @endphp @foreach($sites->take(6) as $index => $site) @php $colorIndex = $index % count($colorClasses); $gradientIndex = $index % count($gradientBorders); $borderGradient = $gradientBorders[$gradientIndex]; $stats = $site->getStatistics(); @endphp

{{ $site->name }}

@if($site->domain)

🌐 {{ $site->domain }}

@endif
{{ number_format($stats['total_analyses'] ?? 0) }}

Analyses

{{ number_format($stats['total_hits'] ?? 0) }}

Hits

{{ number_format($stats['total_urls'] ?? 0) }}

URLs

@endforeach
@if($sites->count() > 6)
Voir tous les sites ({{ $sites->count() }}) →
@endif
@endif @if($analyses->isNotEmpty())

Dernières analyses

@foreach($analyses as $analysis)

{{ $analysis->site ? $analysis->site->name : 'Analyse sans site' }}

📅 {{ $analysis->created_at->format('d/m/Y à H:i') }}

{{ number_format($analysis->total_hits) }}

Hits

{{ number_format($analysis->total_urls) }}

URLs

{{ $analysis->logsIA()->distinct('bot_id')->count() }}

Bots

Analyse du fichier
@endforeach
@endif @endif @endsection