chore: deprecate notification channel alarm on dashboard and notifications (#2577)

This commit is contained in:
Sven van Ginkel
2025-12-19 17:38:22 +01:00
committed by GitHub
parent eb9a3e676e
commit 045a5191d2
16 changed files with 119 additions and 0 deletions
@@ -0,0 +1,66 @@
<?php
namespace App\Livewire;
use App\Settings\NotificationSettings;
use Livewire\Attributes\Computed;
use Livewire\Component;
class DeprecatedNotificationChannelsBanner extends Component
{
#[Computed]
public function hasDeprecatedChannels(): bool
{
$settings = app(NotificationSettings::class);
return $settings->discord_enabled
|| $settings->gotify_enabled
|| $settings->healthcheck_enabled
|| $settings->ntfy_enabled
|| $settings->pushover_enabled
|| $settings->slack_enabled
|| $settings->telegram_enabled;
}
#[Computed]
public function deprecatedChannelsList(): array
{
$settings = app(NotificationSettings::class);
$channels = [];
if ($settings->discord_enabled) {
$channels[] = 'Discord';
}
if ($settings->gotify_enabled) {
$channels[] = 'Gotify';
}
if ($settings->healthcheck_enabled) {
$channels[] = 'Healthchecks';
}
if ($settings->ntfy_enabled) {
$channels[] = 'Ntfy';
}
if ($settings->pushover_enabled) {
$channels[] = 'Pushover';
}
if ($settings->slack_enabled) {
$channels[] = 'Slack';
}
if ($settings->telegram_enabled) {
$channels[] = 'Telegram';
}
return $channels;
}
public function render()
{
return view('livewire.deprecated-notification-channels-banner');
}
}
+2
View File
@@ -1,5 +1,7 @@
<x-app-layout title="Dashboard">
<div class="space-y-6 md:space-y-12 dashboard-page">
<livewire:deprecated-notification-channels-banner />
<livewire:next-speedtest-banner />
<livewire:latest-result-stats />
@@ -1,3 +1,5 @@
**Deprecation Notice: The Discord notification channel will stop working at the end of January 2026. Please migrate to Apprise which supports Discord and many other services.**
**Speedtest Completed - #{{ $id }}**
A new speedtest on **{{ config('app.name') }}** was completed using **{{ $service }}**.
@@ -1,3 +1,5 @@
**Deprecation Notice: The Discord notification channel will stop working at the end of January 2026. Please migrate to Apprise which supports Discord and many other services.**
**Speedtest Threshold Breached - #{{ $id }}**
A new speedtest on **{{ config('app.name') }}** was completed using **{{ $service }}** on **{{ $isp }}** but a threshold was breached.
@@ -1,5 +1,7 @@
<x-filament-panels::page class="dashboard-page">
<div class="space-y-6 md:space-y-12">
<livewire:deprecated-notification-channels-banner />
<livewire:next-speedtest-banner />
<livewire:platform-stats />
@@ -1,3 +1,5 @@
**Deprecation Notice: The Gotify notification channel will stop working at the end of January 2026. Please migrate to Apprise which supports Gotify and many other services.**
**Speedtest Completed - #{{ $id }}**
A new speedtest on **{{ config('app.name') }}** was completed using **{{ $service }}**.
@@ -1,3 +1,5 @@
**Deprecation Notice: The Gotify notification channel will stop working at the end of January 2026. Please migrate to Apprise which supports Gotify and many other services.**
**Speedtest Threshold Breached - #{{ $id }}**
A new speedtest on **{{ config('app.name') }}** was completed using **{{ $service }}** on **{{ $isp }}** but a threshold was breached.
@@ -0,0 +1,25 @@
<div>
@if ($this->hasDeprecatedChannels)
<div class="rounded-md bg-amber-50 dark:bg-amber-500/10 p-4 outline outline-amber-500/20">
<div class="flex">
<div class="shrink-0">
<x-tabler-alert-triangle class="size-5 text-amber-400" />
</div>
<div class="ml-3 flex-1">
<h3 class="text-sm font-medium text-amber-800 dark:text-amber-300">
Deprecated Notification Channels
</h3>
<div class="mt-2 text-sm text-amber-700 dark:text-amber-400">
<p>
You are currently using the following deprecated notification channels: <strong>{{ implode(', ', $this->deprecatedChannelsList) }}</strong>.
</p>
<p class="mt-1">
These channels will be removed at the end of January 2026. As of that moment you will no longer receive notifications. Please migrate to <a href="{{ url('/admin/notification') }}" class="font-medium underline hover:text-amber-900 dark:hover:text-amber-200">Apprise</a> which supports all these services and more.
</p>
</div>
</div>
</div>
</div>
@endif
</div>
@@ -1,3 +1,5 @@
Deprecation Notice: The Ntfy notification channel will stop working at the end of January 2026. Please migrate to Apprise which supports Ntfy and many other services.
Speedtest Completed - #{{ $id }}
A new speedtest on {{ config('app.name') }} was completed using {{ $service }}.
@@ -1,3 +1,5 @@
Deprecation Notice: The Ntfy notification channel will stop working at the end of January 2026. Please migrate to Apprise which supports Ntfy and many other services.
Speedtest Threshold Breached - #{{ $id }}
A new speedtest on **{{ config('app.name') }}** was completed using **{{ $service }}** on **{{ $isp }}** but a threshold was breached.
@@ -1,3 +1,5 @@
Deprecation Notice: The Pushover notification channel will stop working at the end of January 2026. Please migrate to Apprise which supports Pushover and many other services.
Speedtest Completed - #{{ $id }}
A new speedtest on {{ config('app.name') }} was completed using {{ $service }}.
@@ -1,3 +1,5 @@
Deprecation Notice: The Pushover notification channel will stop working at the end of January 2026. Please migrate to Apprise which supports Pushover and many other services.
Speedtest Threshold Breached - #{{ $id }}
A new speedtest on **{{ config('app.name') }}** was completed using **{{ $service }}** on **{{ $isp }}** but a threshold was breached.
@@ -1,3 +1,5 @@
*Deprecation Notice: The Slack notification channel will stop working at the end of January 2026. Please migrate to Apprise which supports Slack and many other services.*
*Speedtest Completed - #{{ $id }}*
A new speedtest on *{{ config('app.name') }}* was completed using *{{ $service }}*.
@@ -1,3 +1,5 @@
*Deprecation Notice: The Slack notification channel will stop working at the end of January 2026. Please migrate to Apprise which supports Slack and many other services.*
**Speedtest Threshold Breached - #{{ $id }}**
A new speedtest on **{{ config('app.name') }}** was completed using **{{ $service }}** on **{{ $isp }}** but a threshold was breached.
@@ -1,3 +1,5 @@
**Deprecation Notice: The Telegram notification channel will stop working at the end of January 2026. Please migrate to Apprise which supports Telegram and many other services.**
*Speedtest Completed - #{{ $id }}*
A new speedtest on *{{ config('app.name') }}* was completed using *{{ $service }}*.
@@ -1,3 +1,5 @@
**Deprecation Notice: The Telegram notification channel will stop working at the end of January 2026. Please migrate to Apprise which supports Telegram and many other services.**
**Speedtest Threshold Breached - #{{ $id }}**
A new speedtest on **{{ config('app.name') }}** was completed using **{{ $service }}** on **{{ $isp }}** but a threshold was breached.