@section('site_title', formatTitle([__('Incidents'), config('settings.title')])) @include('shared.breadcrumbs', ['breadcrumbs' => [ ['url' => route('dashboard'), 'title' => __('Home')], ['title' => __('Incidents')] ]])

{{ __('Incidents') }}

{{--
{{ __('New') }}
--}}
{{ __('Incidents') }}
@include('shared.message') @if(count($incidents) == 0) {{ __('No results found.') }} @else
{{ __('Monitor') }}
{{ __('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')) }}
@if ($incident->ended_at) {{ $incident->ended_at->tz(Auth::user()->timezone ?? config('settings.timezone')) }} @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