Skip to content

Commit 045a519

Browse files
authored
chore: deprecate notification channel alarm on dashboard and notifications (alexjustesen#2577)
1 parent eb9a3e6 commit 045a519

16 files changed

+119
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<?php
2+
3+
namespace App\Livewire;
4+
5+
use App\Settings\NotificationSettings;
6+
use Livewire\Attributes\Computed;
7+
use Livewire\Component;
8+
9+
class DeprecatedNotificationChannelsBanner extends Component
10+
{
11+
#[Computed]
12+
public function hasDeprecatedChannels(): bool
13+
{
14+
$settings = app(NotificationSettings::class);
15+
16+
return $settings->discord_enabled
17+
|| $settings->gotify_enabled
18+
|| $settings->healthcheck_enabled
19+
|| $settings->ntfy_enabled
20+
|| $settings->pushover_enabled
21+
|| $settings->slack_enabled
22+
|| $settings->telegram_enabled;
23+
}
24+
25+
#[Computed]
26+
public function deprecatedChannelsList(): array
27+
{
28+
$settings = app(NotificationSettings::class);
29+
$channels = [];
30+
31+
if ($settings->discord_enabled) {
32+
$channels[] = 'Discord';
33+
}
34+
35+
if ($settings->gotify_enabled) {
36+
$channels[] = 'Gotify';
37+
}
38+
39+
if ($settings->healthcheck_enabled) {
40+
$channels[] = 'Healthchecks';
41+
}
42+
43+
if ($settings->ntfy_enabled) {
44+
$channels[] = 'Ntfy';
45+
}
46+
47+
if ($settings->pushover_enabled) {
48+
$channels[] = 'Pushover';
49+
}
50+
51+
if ($settings->slack_enabled) {
52+
$channels[] = 'Slack';
53+
}
54+
55+
if ($settings->telegram_enabled) {
56+
$channels[] = 'Telegram';
57+
}
58+
59+
return $channels;
60+
}
61+
62+
public function render()
63+
{
64+
return view('livewire.deprecated-notification-channels-banner');
65+
}
66+
}

resources/views/dashboard.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<x-app-layout title="Dashboard">
22
<div class="space-y-6 md:space-y-12 dashboard-page">
3+
<livewire:deprecated-notification-channels-banner />
4+
35
<livewire:next-speedtest-banner />
46

57
<livewire:latest-result-stats />

resources/views/discord/speedtest-completed.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
**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.**
2+
13
**Speedtest Completed - #{{ $id }}**
24

35
A new speedtest on **{{ config('app.name') }}** was completed using **{{ $service }}**.

resources/views/discord/speedtest-threshold.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
**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.**
2+
13
**Speedtest Threshold Breached - #{{ $id }}**
24

35
A new speedtest on **{{ config('app.name') }}** was completed using **{{ $service }}** on **{{ $isp }}** but a threshold was breached.

resources/views/filament/pages/dashboard.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<x-filament-panels::page class="dashboard-page">
22
<div class="space-y-6 md:space-y-12">
3+
<livewire:deprecated-notification-channels-banner />
4+
35
<livewire:next-speedtest-banner />
46

57
<livewire:platform-stats />

resources/views/gotify/speedtest-completed.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
**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.**
2+
13
**Speedtest Completed - #{{ $id }}**
24

35
A new speedtest on **{{ config('app.name') }}** was completed using **{{ $service }}**.

resources/views/gotify/speedtest-threshold.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
**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.**
2+
13
**Speedtest Threshold Breached - #{{ $id }}**
24

35
A new speedtest on **{{ config('app.name') }}** was completed using **{{ $service }}** on **{{ $isp }}** but a threshold was breached.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<div>
2+
@if ($this->hasDeprecatedChannels)
3+
<div class="rounded-md bg-amber-50 dark:bg-amber-500/10 p-4 outline outline-amber-500/20">
4+
<div class="flex">
5+
<div class="shrink-0">
6+
<x-tabler-alert-triangle class="size-5 text-amber-400" />
7+
</div>
8+
9+
<div class="ml-3 flex-1">
10+
<h3 class="text-sm font-medium text-amber-800 dark:text-amber-300">
11+
Deprecated Notification Channels
12+
</h3>
13+
<div class="mt-2 text-sm text-amber-700 dark:text-amber-400">
14+
<p>
15+
You are currently using the following deprecated notification channels: <strong>{{ implode(', ', $this->deprecatedChannelsList) }}</strong>.
16+
</p>
17+
<p class="mt-1">
18+
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.
19+
</p>
20+
</div>
21+
</div>
22+
</div>
23+
</div>
24+
@endif
25+
</div>

resources/views/ntfy/speedtest-completed.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
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.
2+
13
Speedtest Completed - #{{ $id }}
24

35
A new speedtest on {{ config('app.name') }} was completed using {{ $service }}.

resources/views/ntfy/speedtest-threshold.blade.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
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.
2+
13
Speedtest Threshold Breached - #{{ $id }}
24

35
A new speedtest on **{{ config('app.name') }}** was completed using **{{ $service }}** on **{{ $isp }}** but a threshold was breached.

0 commit comments

Comments
 (0)