From 8f77bc8fad00d272c98086321892b4affe00615f Mon Sep 17 00:00:00 2001 From: notCharles Date: Fri, 7 Nov 2025 17:24:02 -0500 Subject: [PATCH] fixes --- app/Filament/Admin/Pages/ListLogs.php | 10 +++++----- app/Filament/Admin/Pages/ViewLogs.php | 14 +++++++------- composer.lock | 4 ++-- lang/en/admin/log.php | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/Filament/Admin/Pages/ListLogs.php b/app/Filament/Admin/Pages/ListLogs.php index 019ee4d97..d83aa0ad0 100644 --- a/app/Filament/Admin/Pages/ListLogs.php +++ b/app/Filament/Admin/Pages/ListLogs.php @@ -68,9 +68,9 @@ class ListLogs extends BaseListLogs $uploadLines = $totalLines <= 1000 ? $lines : array_slice($lines, -1000); $content = implode("\n", $uploadLines); - $hbUrl = 'https://logs.pelican.dev'; + $logUrl = 'https://logs.pelican.dev'; try { - $response = Http::timeout(10)->asMultipart()->post($hbUrl, [ + $response = Http::timeout(10)->asMultipart()->post($logUrl, [ [ 'name' => 'c', 'contents' => $content, @@ -83,8 +83,8 @@ class ListLogs extends BaseListLogs if ($response->failed()) { Notification::make() - ->title(trans('admin/log.actions.filed_to_upload')) - ->body(trans('admin/log.actions.filed_to_upload', ['status' => $response->status()])) + ->title(trans('admin/log.actions.failed_to_upload')) + ->body(trans('admin/log.actions.failed_to_upload_description', ['status' => $response->status()])) ->danger() ->send(); @@ -109,7 +109,7 @@ class ListLogs extends BaseListLogs } catch (\Exception $e) { Notification::make() - ->title(trans('admin/log.actions.filed_to_upload')) + ->title(trans('admin/log.actions.failed_to_upload')) ->body($e->getMessage()) ->danger() ->send(); diff --git a/app/Filament/Admin/Pages/ViewLogs.php b/app/Filament/Admin/Pages/ViewLogs.php index 76604570d..bec128326 100644 --- a/app/Filament/Admin/Pages/ViewLogs.php +++ b/app/Filament/Admin/Pages/ViewLogs.php @@ -27,9 +27,9 @@ class ViewLogs extends BaseViewLog ->requiresConfirmation() ->tooltip(trans('admin/log.actions.upload_tooltip', ['url' => 'logs.pelican.dev'])) ->modalHeading(trans('admin/log.actions.upload_logs')) - ->modalDescription(trans('admin/log.actions.upload_logs_description', ['file' => $this->record->date, 'url' => 'https://logs.pelican.dev'])) + ->modalDescription(trans('admin/log.actions.upload_logs_description', ['file' => $this->record['date'], 'url' => 'https://logs.pelican.dev'])) ->action(function () { - $logPath = storage_path('logs/' . $this->record->date); + $logPath = storage_path('logs/' . $this->record['date']); if (!file_exists($logPath)) { Notification::make() @@ -46,9 +46,9 @@ class ViewLogs extends BaseViewLog $uploadLines = $totalLines <= 1000 ? $lines : array_slice($lines, -1000); $content = implode("\n", $uploadLines); - $hbUrl = 'https://logs.pelican.dev'; + $logUrl = 'https://logs.pelican.dev'; try { - $response = Http::timeout(10)->asMultipart()->post($hbUrl, [ + $response = Http::timeout(10)->asMultipart()->post($logUrl, [ [ 'name' => 'c', 'contents' => $content, @@ -61,8 +61,8 @@ class ViewLogs extends BaseViewLog if ($response->failed()) { Notification::make() - ->title(trans('admin/log.actions.filed_to_upload')) - ->body(trans('admin/log.actions.filed_to_upload', ['status' => $response->status()])) + ->title(trans('admin/log.actions.failed_to_upload')) + ->body(trans('admin/log.actions.failed_to_upload_description', ['status' => $response->status()])) ->danger() ->send(); @@ -87,7 +87,7 @@ class ViewLogs extends BaseViewLog } catch (\Exception $e) { Notification::make() - ->title(trans('admin/log.actions.filed_to_upload')) + ->title(trans('admin/log.actions.failed_to_upload')) ->body($e->getMessage()) ->danger() ->send(); diff --git a/composer.lock b/composer.lock index 397321930..e7b022585 100644 --- a/composer.lock +++ b/composer.lock @@ -15329,7 +15329,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^8.3 || ^8.4", + "php": "^8.2 || ^8.3 || ^8.4", "ext-intl": "*", "ext-json": "*", "ext-mbstring": "*", @@ -15338,7 +15338,7 @@ }, "platform-dev": {}, "platform-overrides": { - "php": "8.3" + "php": "8.2" }, "plugin-api-version": "2.6.0" } diff --git a/lang/en/admin/log.php b/lang/en/admin/log.php index d2002e1d3..275df75b6 100644 --- a/lang/en/admin/log.php +++ b/lang/en/admin/log.php @@ -11,7 +11,7 @@ return [ 'view_logs' => 'View Logs', 'log_not_found' => 'Log not found!', 'log_not_found_description' => 'Could not find log for :filename', - 'filed_to_upload' => 'Filed to upload.', + 'failed_to_upload' => 'Filed to upload.', 'failed_to_upload_description' => 'HTTP Status: :status', 'log_upload' => 'Log Uploaded!', 'log_upload_action' => 'View Log',