@section('site_title', formatTitle([$monitor->name, __('Incidents'), config('settings.title')])) @include('monitors.header')
{{ __('Incidents') }}
@include('shared.message') @if(count($incidents) == 0) {{ __('No results found.') }} @else
{{ __('Cause') }}
{{ __('Duration') }}
{{ __('Started at') }}
{{ __('Ended at') }}
@foreach($incidents as $incident)
@include('icons.' . ($incident->status == 'resolved' ? 'check-circle-filled' : ($incident->status == 'unresolved' ? 'error-filled' : 'offline-bolt-filled')), ['class' => 'width-4 height-4 fill-current ' . ($incident->status == 'resolved' ? 'text-success' : ($incident->status == 'unresolved' ? 'text-danger' : 'text-warning'))])​
{{ ($incident->cause ? __($incident->cause) : __('No data')) }}
@php \Carbon\Carbon::disableHumanDiffOption(\Carbon\Carbon::NO_ZERO_DIFF); @endphp {{ formatDiffWithSpacing($incident->started_at->diffForHumans($incident->ended_at ?? \Carbon\Carbon::now(), ['syntax' => true, 'parts' => 2, 'join' => true, 'short' => true])) }} @php \Carbon\Carbon::enableHumanDiffOption(\Carbon\Carbon::NO_ZERO_DIFF); @endphp
{{ $incident->started_at->tz(Auth::user()->timezone ?? config('settings.timezone'))->format(__('Y-m-d') . ' H:i:s') }}
@if ($incident->ended_at) {{ $incident->ended_at->tz(Auth::user()->timezone ?? config('settings.timezone'))->format(__('Y-m-d') . ' H:i:s') }} @else {{ __('Ongoing') }} @endif
@include('incidents.partials.menu')
@endforeach
{{ __('Showing :from-:to of :total', ['from' => $incidents->firstItem(), 'to' => $incidents->lastItem(), 'total' => $incidents->total()]) }}
{{ $incidents->onEachSide(1)->links() }}
@endif
{{ __('Report generated on :date at :time (UTC :offset).', ['date' => (clone $now)->tz(Auth::user()->timezone ?? config('settings.timezone'))->format(__('Y-m-d')), 'time' => (clone $now)->tz(Auth::user()->timezone ?? config('settings.timezone'))->format('H:i:s'), 'offset' => (clone $now)->tz(Auth::user()->timezone ?? config('settings.timezone'))->getOffsetString()]) }} {{ __('Refresh report') }}