@php $clickhouseTable = (string) config('services.clickhouse.email_event_logs_table', 'email_event_logs'); $clickhouseEmailQuery = "source: clickhouse\nprovider: mandrill\ntable: {$clickhouseTable}"; $currentAppId = null; $currentPlatformName = ''; $currentPlatformToken = ''; if (auth()->check() && is_numeric(auth()->user()?->app_id) && (int) auth()->user()?->app_id > 0) { $currentAppId = (int) auth()->user()?->app_id; } elseif (is_numeric(session('app_id')) && (int) session('app_id') > 0) { $currentAppId = (int) session('app_id'); } try { if ( $currentAppId !== null && \Illuminate\Support\Facades\Schema::hasTable('clients') && \Illuminate\Support\Facades\Schema::hasColumn('clients', 'name') ) { $name = \Illuminate\Support\Facades\DB::table('clients') ->where('app_id', $currentAppId) ->value('name'); if (is_string($name) && trim($name) !== '') { $currentPlatformName = trim($name); } } } catch (\Throwable) { $currentPlatformName = ''; } if ($currentPlatformName === '' && auth()->check()) { $currentPlatformName = trim((string) (auth()->user()?->organisation ?? '')); } if ($currentPlatformName !== '') { $normalizedWords = preg_split('/\s+/', preg_replace('/[^A-Za-z0-9]+/', ' ', $currentPlatformName) ?? '') ?: []; $normalizedWords = array_values(array_filter($normalizedWords, static fn ($word) => trim((string) $word) !== '')); if (count($normalizedWords) > 1) { $abbr = ''; foreach ($normalizedWords as $word) { $abbr .= strtoupper(substr((string) $word, 0, 1)); } $currentPlatformToken = trim($abbr); } else { $currentPlatformToken = strtoupper((string) ($normalizedWords[0] ?? $currentPlatformName)); } $currentPlatformToken = trim(preg_replace('/[^A-Za-z0-9_ -]+/', '', $currentPlatformToken) ?? ''); } if ($currentPlatformToken !== '') { $clickhouseEmailQuery .= "\npayload.template contains platform: {$currentPlatformToken}"; } $grafanaEmbedUrl = ''; @endphp @push('styles') @endpush
Not loaded
ClickHouse Filter (Current)
{{ $clickhouseEmailQuery }}
Total Emails Sent ⓘ

0

↗ realtime
Successful ⓘ

0

↗ realtime
Failed ⓘ

0

↗ realtime
Rejected ⓘ

0

↗ realtime
Success Rate ⓘ

0%

↗ realtime
Email Events (10-minute buckets)
Top Failure Reasons
  1. No failed email events in selected window.
Recent Email Events Showing latest events
TimeOutcomeDetailsIP Hash
No events loaded yet.
Scroll down to load more events.
@if($grafanaEmbedUrl && !str_contains($grafanaEmbedUrl, '/explore'))
Embedded Grafana Dashboard
@endif
@push('scripts') @endpush