latest(2000); $name = sprintf('indexierung-%s.csv', now()->format('Y-m-d')); return response()->streamDownload(function () use ($rows): void { $handle = fopen('php://output', 'wb'); fputcsv($handle, ['Geprüft', 'Portal', 'ID', 'Titel', 'URL', 'Befund', 'Google-Status', 'Zuletzt gecrawlt', 'Kanonisch'], ';'); foreach ($rows as $check) { fputcsv($handle, [ $check->checked_at->format('d.m.Y H:i'), $check->portal->label(), $check->press_release_id, $check->pressRelease?->title ?? '', $check->url, $check->state->label(), $check->coverage_state ?? '', $check->last_crawl_time?->format('d.m.Y') ?? '', $check->google_canonical ?? '', ], ';'); } fclose($handle); }, $name, ['Content-Type' => 'text/csv; charset=UTF-8']); } public function with(): array { $report = app(IndexStatusReport::class); return [ 'configured' => app(SearchConsoleClient::class)->isConfigured(), 'customerVisible' => (bool) config('search_console.customer_visible'), 'distribution' => $report->distribution(), 'latest' => $report->latest(100), 'lastCheckedAt' => $report->lastCheckedAt(), 'states' => IndexState::cases(), 'portals' => [Portal::Presseecho, Portal::Businessportal24], ]; } }; ?>
{{ $configured ? __('täglicher Lauf 05:10 Uhr') : __('GSC_ENABLED und Schlüsseldatei setzen') }} {{ __('Momentaufnahmen, jede Antwort eine Zeile') }} {{ __('Entscheidung E8 — config search_console.customer_visible') }}
@foreach ($portals as $portal)
{{ $portal->label() }} {{ __('im Archiv sichtbare Meldungen, Stand der jeweils jüngsten Prüfung') }}
{{ __('Herkunft') }} {{ __('Meldungen') }} @foreach ($states as $state) {{ ucfirst($state->label()) }} @endforeach {{ __('Ungeprüft') }} @foreach (['direct' => __('Direkt eingereicht'), 'api' => __('Syndikation (API)')] as $origin => $label) @php $row = $distribution[$portal->value][$origin] ?? []; $checkedTotal = max(0, ($row['total'] ?? 0) - ($row['unchecked'] ?? 0)); @endphp {{ $label }} {{ number_format($row['total'] ?? 0, 0, ',', '.') }} @foreach ($states as $state) @php $count = (int) ($row[$state->value] ?? 0); @endphp {{ number_format($count, 0, ',', '.') }} @if ($checkedTotal > 0) {{ number_format($count / $checkedTotal * 100, 1, ',', '.') }} % @endif @endforeach {{ number_format($row['unchecked'] ?? 0, 0, ',', '.') }} @endforeach
@endforeach
{{ __('Jüngste Prüfungen') }} @if ($latest->isNotEmpty()) {{ __('CSV') }} @endif
{{ __('Geprüft') }} {{ __('Meldung') }} {{ __('Portal') }} {{ __('Befund') }} {{ __('Zuletzt gecrawlt') }} @forelse ($latest as $check) {{ $check->checked_at->format('d.m.Y H:i') }} {{ $check->pressRelease?->title ?? '#'.$check->press_release_id }} {{ __('veröffentlicht :date', ['date' => $check->pressRelease?->published_at?->format('d.m.Y') ?? '—']) }} {{ $check->portal->label() }} $check->state === IndexState::Indexed, 'warn' => in_array($check->state, [IndexState::CrawledNotIndexed, IndexState::NotCrawled], true), 'err' => $check->state === IndexState::Excluded, 'muted' => $check->state === IndexState::Unknown])>{{ $check->state->label() }} @if ($check->coverage_state) {{ $check->coverage_state }} @endif {{ $check->last_crawl_time?->format('d.m.Y') ?? '—' }} @empty
{{ __('Noch keine Prüfung gespeichert. Erster Lauf: php artisan press-releases:check-index-status') }}
@endforelse