feat: Prepare Zemailnator for Dokploy deployment
- Add highly optimized Dockerfile with Nginx and PHP-FPM 8.4 - Add docker-compose.yml configured with Redis and MariaDB 10.11 - Implement entrypoint.sh and supervisord.conf for background workers - Refactor legacy IMAP scripts into scheduled Artisan Commands - Secure app by removing old routes with hardcoded basic auth credentials - Configure email attachments to use Laravel Storage instead of insecure public/tmp
This commit is contained in:
@@ -27,7 +27,6 @@ use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Str;
|
||||
use UnitEnum;
|
||||
|
||||
class ImpersonationLogViewer extends Page implements HasForms, HasTable
|
||||
@@ -132,10 +131,10 @@ class ImpersonationLogViewer extends Page implements HasForms, HasTable
|
||||
TextColumn::make('duration_in_minutes')
|
||||
->label('Duration')
|
||||
->formatStateUsing(function ($record) {
|
||||
return match(true) {
|
||||
!$record->duration_in_minutes => 'Active',
|
||||
return match (true) {
|
||||
! $record->duration_in_minutes => 'Active',
|
||||
$record->duration_in_minutes < 60 => "{$record->duration_in_minutes}m",
|
||||
default => round($record->duration_in_minutes / 60, 1) . 'h',
|
||||
default => round($record->duration_in_minutes / 60, 1).'h',
|
||||
};
|
||||
})
|
||||
->sortable()
|
||||
@@ -324,7 +323,7 @@ class ImpersonationLogViewer extends Page implements HasForms, HasTable
|
||||
->latest('start_time')
|
||||
->get();
|
||||
|
||||
$filename = 'impersonation_logs_' . now()->format('Y_m_d_H_i_s') . '.csv';
|
||||
$filename = 'impersonation_logs_'.now()->format('Y_m_d_H_i_s').'.csv';
|
||||
|
||||
// Create a temporary file
|
||||
$handle = fopen('php://temp', 'r+');
|
||||
@@ -376,7 +375,7 @@ class ImpersonationLogViewer extends Page implements HasForms, HasTable
|
||||
$filename,
|
||||
[
|
||||
'Content-Type' => 'text/csv',
|
||||
'Content-Disposition' => 'attachment; filename="' . $filename . '"',
|
||||
'Content-Disposition' => 'attachment; filename="'.$filename.'"',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user