From abadaa4612e57120f22658c071d0a6fbb3804036 Mon Sep 17 00:00:00 2001 From: Lewis Larsen Date: Fri, 2 Aug 2024 23:38:59 +0100 Subject: [PATCH] style: Fixed debug mode in modal --- .../backup-tasks/modals/log-modal.blade.php | 100 ++++++++++-------- .../backup-task-history-table.blade.php | 14 +-- 2 files changed, 58 insertions(+), 56 deletions(-) diff --git a/resources/views/livewire/backup-tasks/modals/log-modal.blade.php b/resources/views/livewire/backup-tasks/modals/log-modal.blade.php index bfd9033a..9a70549c 100644 --- a/resources/views/livewire/backup-tasks/modals/log-modal.blade.php +++ b/resources/views/livewire/backup-tasks/modals/log-modal.blade.php @@ -1,7 +1,7 @@
- {{ __('Log Results') }} + {{ __('Viewing latest log for ":label".', ['label' => $backupTask?->label ?? __('Unknown')]) }} {{ __('Viewing a Backup Task log.') }} @@ -9,57 +9,65 @@ heroicon-o-document-text -
-

- {{ __('Viewing latest log for ":label".', ['label' => $backupTask?->label ?? __('Unknown')]) }} -

- +
@if (app()->isLocal()) - -
- -
-
    -
  • - @svg('heroicon-o-identification', 'w-4 h-4 mr-2 text-gray-500 dark:text-gray-400') - Component ID: {{ $this->getId() }} -
  • -
  • - @svg('heroicon-o-clipboard-document-list', 'w-4 h-4 mr-2 text-gray-500 dark:text-gray-400') - Backup Task ID: {{ $backupTaskId }} -
  • -
  • - @svg('heroicon-o-arrow-path', 'w-4 h-4 mr-2 text-gray-500 dark:text-gray-400') - Is Streaming: {{ $isStreaming ? 'Yes' : 'No' }} -
  • -
  • - @svg('heroicon-o-clock', 'w-4 h-4 mr-2 text-gray-500 dark:text-gray-400') - Is Loading: {{ $isLoading ? 'Yes' : 'No' }} -
  • -
  • - @svg('heroicon-o-document-text', 'w-4 h-4 mr-2 text-gray-500 dark:text-gray-400') - Log Output Length: {{ strlen($logOutput) }} -
  • + +
    +
      + @php + $debugItems = [ + ['icon' => 'identification', 'label' => 'Component ID', 'value' => $this->getId()], + ['icon' => 'clipboard-document-list', 'label' => 'Backup Task ID', 'value' => $backupTaskId], + ['icon' => 'arrow-path', 'label' => 'Is Streaming', 'value' => $isStreaming ? 'Yes' : 'No'], + ['icon' => 'clock', 'label' => 'Is Loading', 'value' => $isLoading ? 'Yes' : 'No'], + ['icon' => 'document-text', 'label' => 'Log Output Length', 'value' => strlen($logOutput)], + ]; + @endphp + + @foreach ($debugItems as $item) +
    • + + + {{ $item['label'] }}: + + {{ $item['value'] }} +
    • + @endforeach
@endif -
@if ($isLoading)
diff --git a/resources/views/livewire/backup-tasks/tables/backup-task-history-table.blade.php b/resources/views/livewire/backup-tasks/tables/backup-task-history-table.blade.php index 6a9a2cc4..a8350ba6 100644 --- a/resources/views/livewire/backup-tasks/tables/backup-task-history-table.blade.php +++ b/resources/views/livewire/backup-tasks/tables/backup-task-history-table.blade.php @@ -74,22 +74,16 @@ @livewire('backup-tasks.buttons.delete-backup-task-log-button', ['backupTaskLog' => $backupTaskLog]) - {{ __('Log Results') }} + {{ __('Viewing log for finished task: ":label".', ['label' => $backupTaskLog->backupTask->label]) }} - {{ __('Viewing a Backup Task log.') }} + {{ __('This log was generated :date.', ['date' => $backupTaskLog->created_at->timezone(Auth::user()->timezone ?? config('app.timezone'))->format('l, d F Y H:i')]) }} heroicon-o-document-text -
-

- {{ __('Viewing log for finished task: ":label".', ['label' => $backupTaskLog->backupTask->label]) }} -

-

- {{ __('This log was generated :date.', ['date' => $backupTaskLog->created_at->timezone(Auth::user()->timezone ?? config('app.timezone'))->format('l, d F Y H:i')]) }} -

-
+
+
{{ $backupTaskLog->output }}