@extends('layouts.site') @section('title', 'MySQL Editor - Podsumowanie') @php $runs = $runs ?? collect(); $actions = $actions ?? collect(); $selectedRunId = (int) ($selectedRunId ?? 0); $selectedRunDate = trim((string) ($selectedRunDate ?? '')); $displayTimezone = 'Europe/Warsaw'; $formatLocalDateTime = static function ($value) use ($displayTimezone) { if (empty($value)) { return '-'; } try { return \Illuminate\Support\Carbon::parse((string) $value, 'UTC') ->setTimezone($displayTimezone) ->format('Y-m-d H:i:s'); } catch (\Throwable $exception) { return (string) $value; } }; @endphp @section('content')
MySQL Editor - Podsumowanie wykonan

@if(!$logTablesReady) @endif @if (session('mysql_editor_success')) @endif @if (session('mysql_editor_error')) @endif @if ($logTablesReady)
Wszystkie daty i godziny sa wyswietlane w czasie lokalnym: {{ $displayTimezone }}
Wszystkie
@if($selectedRun)
Podsumowanie uruchomienia #{{ $selectedRun->id }}
Status: {{ strtoupper($selectedRun->status ?? '-') }}
OK: {{ (int) ($selectedRun->success_count ?? 0) }}
Bledy: {{ (int) ($selectedRun->error_count ?? 0) }}
Start: {{ $formatLocalDateTime($selectedRun->started_at ?? null) }}
@endif
Akcje DB {{ $selectedRunId > 0 ? '(Run #' . $selectedRunId . ')' : '(Wszystkie)' }}
@forelse($actions as $index => $action) @php $rawStatus = strtolower((string) ($action->status ?? '')); $isOk = $rawStatus === 'success'; $statusLabel = $isOk ? 'OK' : 'Error'; $statusClass = $isOk ? 'text-success' : 'text-danger'; $details = trim((string) ($action->error_message ?? '')); if ($isOk && $details === '') { $details = 'Wykonano poprawnie.'; } if (!$isOk && $details === '') { $details = 'Brak szczegolow bledu.'; } if (!empty($action->failed_statement_index)) { $details .= ' | Instrukcja #' . $action->failed_statement_index; } if (!empty($action->failed_statement_preview)) { $details .= ' | SQL: ' . $action->failed_statement_preview; } if ((int) $action->run_id > 0) { $details .= ' | Run #' . $action->run_id; } $scriptDateTime = $formatLocalDateTime($action->run_started_at ?? $action->started_at ?? null); $details .= ' | Start run: ' . $formatLocalDateTime($action->run_started_at ?? null); $details .= ' | Koniec akcji: ' . $formatLocalDateTime($action->finished_at ?? null); @endphp @empty @endforelse
Lp Data i godzina skryptu db_name status Szczegoly
{{ $index + 1 }} {{ $scriptDateTime }} {{ $action->database_name ?? '-' }} {{ $statusLabel }} {{ $details }}
Brak wykonanych akcji.
@endif
@endsection @section('navbar') @include('sites.admin._navbar_m_admin_site') MySQL Editor Podsumowanie wykonan @endsection @section('menu') @include('sites.admin.menu_admin') @endsection @section('modal_windows') @endsection