This commit is contained in:
notCharles 2025-11-07 17:24:02 -05:00
parent 33869e718c
commit 8f77bc8fad
4 changed files with 15 additions and 15 deletions

View File

@ -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();

View File

@ -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();

4
composer.lock generated
View File

@ -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"
}

View File

@ -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',