From 2e76515e3c447528a5728068e860df93cdda2226 Mon Sep 17 00:00:00 2001 From: Alex Justesen Date: Mon, 15 Apr 2024 09:18:43 -0400 Subject: [PATCH] [Chore] Added deprecated image warning to admin panel (#1380) --- Dockerfile | 4 +++- app/Filament/Pages/Dashboard.php | 2 ++ app/Filament/Widgets/DeprecatedImage.php | 18 ++++++++++++++++++ .../widgets/deprecated-image.blade.php | 14 ++++++++++++++ 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 app/Filament/Widgets/DeprecatedImage.php create mode 100644 resources/views/filament/widgets/deprecated-image.blade.php diff --git a/Dockerfile b/Dockerfile index 7a28b1c80..79f967f02 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,9 @@ RUN apt-get update \ \ # Clean up package lists && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* \ +# Add deprecated image file + && touch /var/html/www/storage/app/public/.deprecated_image # Copy package configs COPY --chmod=755 docker/deploy/etc /etc 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/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/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. +

+
+
+