@php $automation = $this->automation(); @endphp
{{ __('Execution history') }}

@if ($automation !== null) {{ __('Every attempt the engine made for ":name".', ['name' => $automation->name]) }} @else {{ __('Every attempt the engine has made across all automations on this account. Skipped means the ticket drifted out of the matching state between scan and action.') }} @endif

@if ($automation !== null) {{ __('Back to rule') }} @endif {{ __('Back to automations') }}
{{-- Filters --}}
{{ __('Status') }} @foreach ($this->statusOptions() as $option) {{ $option['label'] }} @endforeach
@php $executions = $this->executions(); @endphp @if ($executions->isEmpty())
{{ __('No execution rows yet.') }}
@else
@if ($automationId === null) @endif @foreach ($executions as $execution) @if ($automationId === null) @endif @endforeach
{{ __('When') }}{{ __('Automation') }}{{ __('Subject') }} {{ __('Status') }} {{ __('Detail') }}
{{ $execution->started_at?->diffForHumans() ?? '—' }} @if ($execution->automation) {{ $execution->automation->name }} @else @endif @if ($execution->subject_type && $execution->subject_id) {{ class_basename($execution->subject_type) }} #{{ $execution->subject_id }} @else @endif @php $status = $execution->status; @endphp {{ $status?->label() ?? '—' }} @php $reason = $execution->condition_snapshot_json['reason_if_skipped'] ?? null; $err = $execution->error_json['message'] ?? null; @endphp @if ($err !== null) {{ $err }} @elseif ($reason !== null) {{ $reason }} @elseif ($status?->value === 'succeeded') {{ __('Actions ran cleanly.') }} @else @endif
{{ $executions->withQueryString()->links() }}
@endif