@extends('layouts.app') @section('content')
@if(count($automatedAlerts) > 0)
@endif
System Uptime

{{ $uptimePercentage }}%

{{ $uptimePercentage >= 99 ? 'Excellent' : ($uptimePercentage >= 95 ? 'Good' : 'Needs Attention') }}
Device Registration

{{ $registrationRate }}%

{{ $registeredHandsets }}/{{ $totalHandsets }} devices
Call Success Rate

{{ $callSuccessRate }}%

{{ $callsToday }} calls today
Active Issues

{{ $totalAlerts }}

{{ $criticalAlerts }} critical
Active Calls
{{ $activeCalls }} active
@if($activeCallsList->count() > 0) @foreach($activeCallsList as $call)
{{ $call->handset->name ?? 'Unknown' }}
{{ $call->call_direction }} to {{ $call->remote_number }}
{{ $call->call_status }}
{{ $call->start_time->diffForHumans() }}
@endforeach @else

No active calls

@endif
Call Analytics

{{ $callsToday }}

Today

{{ $callsThisWeek }}

This Week

{{ $missedCalls }}

Missed
Avg Duration {{ gmdate('i:s', $avgCallDuration ?? 0) }}
Avg Quality {{ round($avgCallQuality ?? 0, 1) }}/5.0
24-Hour Activity Trend
Device Health
Excellent {{ $deviceHealth['excellent'] }} devices
Good {{ $deviceHealth['good'] }} devices
Fair {{ $deviceHealth['fair'] }} devices
Poor {{ $deviceHealth['poor'] }} devices
Capacity Planning
{{ $utilization }}% Utilized
Current Utilization {{ $totalHandsets }}/{{ $totalCapacity }} handsets
{{ $utilization > 80 ? 'Capacity exceeded - consider expansion' : ($utilization > 60 ? 'Moderate utilization' : 'Healthy capacity') }}

{{ $totalBaseStations }}

Base Stations

{{ $totalHandsets }}

Total Handsets
@if($utilization > 60)
Capacity Planning: {{ $utilization > 80 ? 'Immediate expansion required' : 'Plan for expansion within 3 months' }}
@endif
Performance Metrics
Live
Battery Level {{ round($avgBatteryLevel ?? 0, 1) }}%
Signal Strength {{ round($avgSignalStrength ?? 0, 1) }}%

{{ $events24h }}

Events/24h

{{ $calls24h }}

Calls/24h

{{ $alerts24h }}

Alerts/24h
System Events & Activities
{{ $recentEvents->count() }} events
@if($recentEvents->count() > 0)
@foreach($recentEvents->take(15) as $event) @endforeach
Time Severity Event Type System Base Station Handset Message Duration
{{ $event->created_at->format('H:i:s') }}
{{ $event->created_at->diffForHumans() }}
@if(str_contains($event->message ?? '', 'critical') || str_contains($event->event_type ?? '', 'critical')) Critical @elseif(str_contains($event->message ?? '', 'warning') || str_contains($event->event_type ?? '', 'warning')) Warning @elseif(str_contains($event->event_type ?? '', 'call')) Info @else System @endif {{ $event->event_type ?? 'System' }} {{ $event->dectSystem->name ?? 'N/A' }} {{ $event->dectBaseStation->name ?? 'N/A' }} {{ $event->dectHandset->name ?? 'N/A' }} {{ $event->message ?? 'No message' }} {{ $event->created_at->diffInSeconds(now()) }}s ago
@else

No events recorded yet

Events will appear here as DECT devices are used
@endif
@endsection