From 0e2099afcc7dc37f63a3ff1a19b37ae093786765 Mon Sep 17 00:00:00 2001 From: Alex Justesen Date: Mon, 15 Apr 2024 09:13:31 -0400 Subject: [PATCH 1/2] added deprecated image warning to admin panel --- 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..015c85e1f --- /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. +

+
+
+
From 2cc16971e47ea334c471bed4348ecb3d87508774 Mon Sep 17 00:00:00 2001 From: Alex Justesen Date: Mon, 15 Apr 2024 09:16:17 -0400 Subject: [PATCH 2/2] code quality --- app/Filament/Widgets/DeprecatedImage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Filament/Widgets/DeprecatedImage.php b/app/Filament/Widgets/DeprecatedImage.php index 015c85e1f..8e5f7886b 100644 --- a/app/Filament/Widgets/DeprecatedImage.php +++ b/app/Filament/Widgets/DeprecatedImage.php @@ -9,7 +9,7 @@ class DeprecatedImage extends Widget { protected static string $view = 'filament.widgets.deprecated-image'; - protected int | string | array $columnSpan = 'full'; + protected int|string|array $columnSpan = 'full'; public static function canView(): bool {