@extends('layouts.layoutMaster') @section('title', __('AI Dashboard')) @section('vendor-style') @vite([ 'resources/assets/vendor/libs/apex-charts/apex-charts.scss', 'resources/assets/vendor/libs/datatables-bs5/datatables.bootstrap5.scss', 'resources/assets/vendor/libs/datatables-responsive-bs5/responsive.bootstrap5.scss' ]) @endsection @section('vendor-script') @vite([ 'resources/assets/vendor/libs/apex-charts/apexcharts.js', 'resources/assets/vendor/libs/datatables-bs5/datatables-bootstrap5.js' ]) @endsection @section('page-script') @vite(['Modules/AICore/resources/assets/js/aicore-dashboard.js']) @endsection @section('content')
{{-- Breadcrumb Component --}} {{-- Overview Statistics --}}
{{ $overviewStats['total_providers'] }}
{{ __('AI Providers') }}
{{ $overviewStats['total_models'] }}
{{ __('AI Models') }}
{{ number_format($overviewStats['today']['total_requests'] ?? 0) }}
{{ __('Requests Today') }}
${{ number_format($overviewStats['month']['total_cost'] ?? 0, 2) }}
{{ __('Cost This Month') }}
{{-- Provider Status --}}
{{ __('Provider Status') }}
@foreach($providerStatus as $provider)
{{ $provider['name'] }}
{{ ucfirst($provider['type']) }}
@if($provider['is_connected']) {{ $provider['response_time'] }}ms @else {{ __('Offline') }} @endif
@endforeach
{{-- Usage Trends Chart --}}
{{ __('AI Usage Trends') }}
{{-- Top Models --}}
{{ __('Top AI Models') }}
@if(count($topModels) > 0) @foreach($topModels as $model)
{{ $model['model_name'] }}
{{ $model['provider_name'] }}
{{ number_format($model['total_requests']) }} {{ __('requests') }}
${{ number_format($model['total_cost'], 2) }}
@endforeach @else

{{ __('No usage data available yet') }}

@endif
{{-- Recent Activity --}}
{{ __('Recent AI Activity') }}
{{ __('View All') }}
@if(count($recentUsage) > 0)
@foreach(array_slice($recentUsage, 0, 10) as $activity) @endforeach
{{ $activity['module_name'] }}
{{ $activity['operation_type'] }}
{{ $activity['created_at']->diffForHumans() }}
{{ number_format($activity['total_tokens']) }} tokens
@else

{{ __('No recent activity') }}

@endif
{{-- Page Data for JavaScript --}} @endsection