diff --git a/Dockerfile b/Dockerfile index 7a28b1c80..ade909109 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,4 +38,7 @@ RUN composer install \ --no-dev \ --no-cache +# Add deprecated image file +RUN touch /var/www/html/storage/app/public/.deprecated_image + VOLUME /config diff --git a/app/Filament/Pages/Dashboard.php b/app/Filament/Pages/Dashboard.php index 36f5def65..b45aee80d 100644 --- a/app/Filament/Pages/Dashboard.php +++ b/app/Filament/Pages/Dashboard.php @@ -3,6 +3,7 @@ namespace App\Filament\Pages; use App\Actions\Speedtests\RunOoklaSpeedtest; +use App\Filament\Widgets\DeprecatedImage; use App\Filament\Widgets\RecentDownloadChartWidget; use App\Filament\Widgets\RecentDownloadLatencyChartWidget; use App\Filament\Widgets\RecentJitterChartWidget; @@ -64,6 +65,7 @@ protected function getHeaderActions(): array protected function getHeaderWidgets(): array { return [ + DeprecatedImage::make(), StatsOverviewWidget::make(), RecentDownloadChartWidget::make(), RecentUploadChartWidget::make(), diff --git a/app/Filament/Pages/Settings/GeneralPage.php b/app/Filament/Pages/Settings/GeneralPage.php index 67efcf6f0..cd8635e86 100644 --- a/app/Filament/Pages/Settings/GeneralPage.php +++ b/app/Filament/Pages/Settings/GeneralPage.php @@ -89,7 +89,7 @@ public function form(Form $form): Form Forms\Components\TextInput::make('speedtest_schedule') ->rules([new Cron()]) ->helperText('Leave empty to disable scheduled tests.') - ->hint(new HtmlString('🔗Cron Generator')) + ->hint(new HtmlString('🔗Cron Generator')) ->nullable() ->columnSpan(1), Forms\Components\TextInput::make('prune_results_older_than') diff --git a/app/Filament/Widgets/DeprecatedImage.php b/app/Filament/Widgets/DeprecatedImage.php new file mode 100644 index 000000000..8e5f7886b --- /dev/null +++ b/app/Filament/Widgets/DeprecatedImage.php @@ -0,0 +1,18 @@ +exists('.deprecated_image'); + } +} diff --git a/app/Http/Controllers/API/Speedtest/GetLatestController.php b/app/Http/Controllers/API/Speedtest/GetLatestController.php index 0643c1ab4..1eeb84639 100644 --- a/app/Http/Controllers/API/Speedtest/GetLatestController.php +++ b/app/Http/Controllers/API/Speedtest/GetLatestController.php @@ -4,8 +4,10 @@ use App\Enums\ResultStatus; use App\Helpers\Number; +use App\Helpers\TimeZoneHelper; use App\Http\Controllers\Controller; use App\Models\Result; +use App\Settings\GeneralSettings; use Illuminate\Http\JsonResponse; class GetLatestController extends Controller @@ -26,6 +28,8 @@ public function __invoke(): JsonResponse ], 404); } + $settings = new GeneralSettings(); + return response()->json([ 'message' => 'ok', 'data' => [ @@ -39,8 +43,8 @@ public function __invoke(): JsonResponse 'url' => $latest->result_url, 'scheduled' => $latest->scheduled, 'failed' => $latest->status === ResultStatus::Failed, - 'created_at' => $latest->created_at->toISOString(true), - 'updated_at' => $latest->updated_at->toISOString(true), + 'created_at' => $latest->created_at->timezone(TimeZoneHelper::displayTimeZone($settings))->toISOString(true), + 'updated_at' => $latest->updated_at->timezone(TimeZoneHelper::displayTimeZone($settings))->toISOString(true), ], ]); } diff --git a/config/speedtest.php b/config/speedtest.php index d49f5ad8f..2637cd9d4 100644 --- a/config/speedtest.php +++ b/config/speedtest.php @@ -6,9 +6,9 @@ /** * Build information */ - 'build_date' => Carbon::parse('2024-04-09'), + 'build_date' => Carbon::parse('2024-04-15'), - 'build_version' => 'v0.18.6', + 'build_version' => 'v0.18.7', /** * General diff --git a/resources/views/filament/widgets/deprecated-image.blade.php b/resources/views/filament/widgets/deprecated-image.blade.php new file mode 100644 index 000000000..f4d2e5eb2 --- /dev/null +++ b/resources/views/filament/widgets/deprecated-image.blade.php @@ -0,0 +1,14 @@ + + + + Docker Image Deprecated + + +
+

+ The Docker image you're using has been deprecated and will be replaced in v0.20.0. To upgrade to the new image + follow the steps in the GitHub issue to continue to receive updates. +

+
+
+