@if($isLoading)
Caricamento...

Caricamento statistiche...

@else @if($errorMessage)
Errore!
{{ $errorMessage }}
@endif

{{ number_format($totalCalls) }}

Chiamate Totali

{{ number_format($successfulCalls) }}

Chiamate Riuscite

{{ number_format($averageResponseTime) }}ms

Tempo Medio Risposta

{{ number_format($failedCalls) }}

Chiamate Fallite

Tasso di Successo

Successo {{ $this->getSuccessRate() }}%
Errori {{ $this->getErrorRate() }}%

Stato Chiavi API

Chiavi Totali {{ $apiKeysStats['total_keys'] ?? 0 }}
Chiavi Attive {{ $apiKeysStats['active_keys'] ?? 0 }}
Chiavi Disponibili {{ $apiKeysStats['available_keys'] ?? 0 }}

Utilizzo per Modello

@if(count($modelStats) > 0)
@foreach($modelStats as $model) @endforeach
Modello Chiamate %
{{ $model['model'] }} {{ number_format($model['total_calls']) }} {{ round(($model['total_calls'] / $totalCalls) * 100, 1) }}%
@else

Nessun dato disponibile

@endif

Utilizzo per Endpoint

@if(count($endpointStats) > 0)
@foreach($endpointStats as $endpoint) @endforeach
Endpoint Chiamate %
{{ $endpoint['endpoint'] }} {{ number_format($endpoint['total_calls']) }} {{ round(($endpoint['total_calls'] / $totalCalls) * 100, 1) }}%
@else

Nessun dato disponibile

@endif
@if(count($commonErrors) > 0)

Errori Più Comuni

@foreach($commonErrors as $error) @endforeach
Errore Occorrenze Ultima Occorrenza
{{ Str::limit($error['error_message'], 100) }} {{ number_format($error['occurrence_count']) }} {{ \Carbon\Carbon::parse($error['created_at'] ?? now())->diffForHumans() }}
@endif

Chiavi API

@if(count($apiKeys) > 0)
@foreach($apiKeys as $apiKey) @endforeach
Nome Tipo Stato Utilizzo Azioni
{{ $apiKey->name }} {{ ucfirst($apiKey->type) }} @if($apiKey->is_active) Attiva @else Inattiva @endif @if($apiKey->daily_limit)
{{ $apiKey->daily_usage }}/{{ $apiKey->daily_limit }}
@php $percentage = ($apiKey->daily_usage / $apiKey->daily_limit) * 100; $color = $percentage >= 90 ? 'danger' : ($percentage >= 70 ? 'warning' : 'success'); @endphp
@else Illimitato @endif
@else

Nessuna chiave API configurata

@endif
@endif