diff --git a/app/Actions/Notifications/SendDiscordTestNotification.php b/app/Actions/Notifications/SendDiscordTestNotification.php deleted file mode 100644 index edad6d239..000000000 --- a/app/Actions/Notifications/SendDiscordTestNotification.php +++ /dev/null @@ -1,37 +0,0 @@ -title('You need to add Discord urls!') - ->warning() - ->send(); - - return; - } - - foreach ($webhooks as $webhook) { - WebhookCall::create() - ->url($webhook['url']) - ->payload(['content' => '👋 Testing the Discord notification channel.']) - ->doNotSign() - ->dispatch(); - } - - Notification::make() - ->title('Test Discord notification sent.') - ->success() - ->send(); - } -} diff --git a/app/Actions/Notifications/SendGotifyTestNotification.php b/app/Actions/Notifications/SendGotifyTestNotification.php deleted file mode 100644 index fdd6405de..000000000 --- a/app/Actions/Notifications/SendGotifyTestNotification.php +++ /dev/null @@ -1,37 +0,0 @@ -title('You need to add Gotify urls!') - ->warning() - ->send(); - - return; - } - - foreach ($webhooks as $webhook) { - WebhookCall::create() - ->url($webhook['url']) - ->payload(['message' => '👋 Testing the Gotify notification channel.']) - ->doNotSign() - ->dispatch(); - } - - Notification::make() - ->title('Test Gotify notification sent.') - ->success() - ->send(); - } -} diff --git a/app/Actions/Notifications/SendHealthCheckTestNotification.php b/app/Actions/Notifications/SendHealthCheckTestNotification.php deleted file mode 100644 index f37e20fad..000000000 --- a/app/Actions/Notifications/SendHealthCheckTestNotification.php +++ /dev/null @@ -1,37 +0,0 @@ -title('You need to add HealthCheck.io urls!') - ->warning() - ->send(); - - return; - } - - foreach ($webhooks as $webhook) { - WebhookCall::create() - ->url($webhook['url']) - ->payload(['message' => '👋 Testing the HealthCheck.io notification channel.']) - ->doNotSign() - ->dispatch(); - } - - Notification::make() - ->title('Test HealthCheck.io notification sent.') - ->success() - ->send(); - } -} diff --git a/app/Actions/Notifications/SendNtfyTestNotification.php b/app/Actions/Notifications/SendNtfyTestNotification.php deleted file mode 100644 index 8975febaa..000000000 --- a/app/Actions/Notifications/SendNtfyTestNotification.php +++ /dev/null @@ -1,49 +0,0 @@ -title('You need to add ntfy urls!') - ->warning() - ->send(); - - return; - } - - foreach ($webhooks as $webhook) { - $webhookCall = WebhookCall::create() - ->url($webhook['url']) - ->payload([ - 'topic' => $webhook['topic'], - 'message' => '👋 Testing the ntfy notification channel.', - ]) - ->doNotSign(); - - // Only add authentication if username and password are provided - if (! empty($webhook['username']) && ! empty($webhook['password'])) { - $authHeader = 'Basic '.base64_encode($webhook['username'].':'.$webhook['password']); - $webhookCall->withHeaders([ - 'Authorization' => $authHeader, - ]); - } - - $webhookCall->dispatch(); - } - - Notification::make() - ->title('Test ntfy notification sent.') - ->success() - ->send(); - } -} diff --git a/app/Actions/Notifications/SendPushoverTestNotification.php b/app/Actions/Notifications/SendPushoverTestNotification.php deleted file mode 100644 index d37b0594d..000000000 --- a/app/Actions/Notifications/SendPushoverTestNotification.php +++ /dev/null @@ -1,41 +0,0 @@ -title('You need to add Pushover URLs!') - ->warning() - ->send(); - - return; - } - - foreach ($webhooks as $webhook) { - WebhookCall::create() - ->url($webhook['url']) - ->payload([ - 'token' => $webhook['api_token'], - 'user' => $webhook['user_key'], - 'message' => '👋 Testing the Pushover notification channel.', - ]) - ->doNotSign() - ->dispatch(); - } - - Notification::make() - ->title('Test Pushover notification sent.') - ->success() - ->send(); - } -} diff --git a/app/Actions/Notifications/SendSlackTestNotification.php b/app/Actions/Notifications/SendSlackTestNotification.php deleted file mode 100644 index 95db18439..000000000 --- a/app/Actions/Notifications/SendSlackTestNotification.php +++ /dev/null @@ -1,37 +0,0 @@ -title('You need to add Slack URLs!') - ->warning() - ->send(); - - return; - } - - foreach ($webhooks as $webhook) { - WebhookCall::create() - ->url($webhook['url']) - ->payload(['text' => '👋 Testing the Slack notification channel.']) - ->doNotSign() - ->dispatch(); - } - - Notification::make() - ->title('Test Slack notification sent.') - ->success() - ->send(); - } -} diff --git a/app/Actions/Notifications/SendTelegramTestNotification.php b/app/Actions/Notifications/SendTelegramTestNotification.php deleted file mode 100644 index c7c64a815..000000000 --- a/app/Actions/Notifications/SendTelegramTestNotification.php +++ /dev/null @@ -1,35 +0,0 @@ -title('You need to add Telegram recipients!') - ->warning() - ->send(); - - return; - } - - foreach ($recipients as $recipient) { - FacadesNotification::route('telegram_chat_id', $recipient['telegram_chat_id']) - ->notify(new TestNotification); - } - - Notification::make() - ->title('Test Telegram notification sent.') - ->success() - ->send(); - } -} diff --git a/app/Filament/Pages/Settings/Notification.php b/app/Filament/Pages/Settings/Notification.php index c01ee4e1f..6aa035c3e 100755 --- a/app/Filament/Pages/Settings/Notification.php +++ b/app/Filament/Pages/Settings/Notification.php @@ -4,14 +4,7 @@ use App\Actions\Notifications\SendAppriseTestNotification; use App\Actions\Notifications\SendDatabaseTestNotification; -use App\Actions\Notifications\SendDiscordTestNotification; -use App\Actions\Notifications\SendGotifyTestNotification; -use App\Actions\Notifications\SendHealthCheckTestNotification; use App\Actions\Notifications\SendMailTestNotification; -use App\Actions\Notifications\SendNtfyTestNotification; -use App\Actions\Notifications\SendPushoverTestNotification; -use App\Actions\Notifications\SendSlackTestNotification; -use App\Actions\Notifications\SendTelegramTestNotification; use App\Actions\Notifications\SendWebhookTestNotification; use App\Rules\AppriseScheme; use App\Rules\ContainsString; @@ -26,7 +19,6 @@ use Filament\Schemas\Components\Actions; use Filament\Schemas\Components\Fieldset; use Filament\Schemas\Components\Grid; -use Filament\Schemas\Components\Section; use Filament\Schemas\Components\Tabs; use Filament\Schemas\Components\Tabs\Tab; use Filament\Schemas\Components\Utilities\Get; @@ -260,9 +252,12 @@ public function form(Schema $schema): Schema ->helpertext(__('settings/notifications.notify_on_threshold_failures_helper')) ->columnSpanFull(), ]), + SimpleAlert::make('wehbook_info') + ->border() + ->info() + ->description(__('settings/notifications.apprise_save_to_test')), Repeater::make('apprise_channel_urls') ->label(__('settings/notifications.apprise_channels')) - ->helperText(__('settings/notifications.apprise_save_to_test')) ->schema([ TextInput::make('channel_url') ->label(__('settings/notifications.apprise_channel_url')) @@ -290,357 +285,6 @@ public function form(Schema $schema): Schema ]), ]) ->columnSpanFull(), - - // ! DEPRECATED CHANNELS - SimpleAlert::make('deprecation_warning') - ->title('Deprecated Notification Channels') - ->description('The following notification channels are deprecated and will be removed in a future release!') - ->border() - ->warning() - ->columnSpanFull(), - - Grid::make([ - 'default' => 1, - 'md' => 3, - ]) - ->columnSpan('full') - ->schema([ - Grid::make([ - 'default' => 1, - ]) - ->schema([ - Section::make('Pushover') - ->description('⚠️ Pushover is deprecated and will be removed in a future release.') - ->schema([ - Toggle::make('pushover_enabled') - ->label('Enable Pushover webhook notifications') - ->reactive() - ->columnSpanFull(), - Grid::make([ - 'default' => 1, - ]) - ->hidden(fn (Get $get) => $get('pushover_enabled') !== true) - ->schema([ - Fieldset::make('Triggers') - ->schema([ - Toggle::make('pushover_on_speedtest_run') - ->label('Notify on every speedtest run') - ->columnSpanFull(), - Toggle::make('pushover_on_threshold_failure') - ->label('Notify on threshold failures') - ->columnSpanFull(), - ]), - Repeater::make('pushover_webhooks') - ->label('Pushover Webhooks') - ->schema([ - TextInput::make('url') - ->label('URL') - ->placeholder('http://api.pushover.net/1/messages.json') - ->maxLength(2000) - ->required() - ->url(), - TextInput::make('user_key') - ->label('User Key') - ->placeholder('Your Pushover User Key') - ->maxLength(200) - ->required(), - TextInput::make('api_token') - ->label('API Token') - ->placeholder('Your Pushover API Token') - ->maxLength(200) - ->required(), - ]) - ->columnSpanFull(), - Actions::make([ - Action::make('test pushover') - ->label('Test Pushover webhook') - ->action(fn (Get $get) => SendPushoverTestNotification::run( - webhooks: $get('pushover_webhooks') - )) - ->hidden(fn (Get $get) => ! count($get('pushover_webhooks'))), - ]), - ]), - ]) - ->compact() - ->columnSpan('full'), - - Section::make('Discord') - ->description('⚠️ Discord is deprecated and will be removed in a future release.') - ->schema([ - Toggle::make('discord_enabled') - ->label('Enable Discord webhook notifications') - ->reactive() - ->columnSpanFull(), - Grid::make([ - 'default' => 1, - ]) - ->hidden(fn (Get $get) => $get('discord_enabled') !== true) - ->schema([ - Fieldset::make('Triggers') - ->schema([ - Toggle::make('discord_on_speedtest_run') - ->label('Notify on every speedtest run') - ->columnSpanFull(), - Toggle::make('discord_on_threshold_failure') - ->label('Notify on threshold failures') - ->columnSpanFull(), - ]), - Repeater::make('discord_webhooks') - ->label('Webhooks') - ->schema([ - TextInput::make('url') - ->placeholder('https://discord.com/api/webhooks/longstringofcharacters') - ->maxLength(2000) - ->required() - ->url(), - ]) - ->columnSpanFull(), - Actions::make([ - Action::make('test discord') - ->label('Test Discord webhook') - ->action(fn (Get $get) => SendDiscordTestNotification::run(webhooks: $get('discord_webhooks'))) - ->hidden(fn (Get $get) => ! count($get('discord_webhooks'))), - ]), - ]), - ]) - ->compact() - ->columnSpan('full'), - - Section::make('Gotify') - ->description('⚠️ Gotify is deprecated and will be removed in a future release.') - ->schema([ - Toggle::make('gotify_enabled') - ->label('Enable Gotify webhook notifications') - ->reactive() - ->columnSpanFull(), - Grid::make([ - 'default' => 1, - ]) - ->hidden(fn (Get $get) => $get('gotify_enabled') !== true) - ->schema([ - Fieldset::make('Triggers') - ->schema([ - Toggle::make('gotify_on_speedtest_run') - ->label('Notify on every speedtest run') - ->columnSpanFull(), - Toggle::make('gotify_on_threshold_failure') - ->label('Notify on threshold failures') - ->columnSpanFull(), - ]), - Repeater::make('gotify_webhooks') - ->label('Webhooks') - ->schema([ - TextInput::make('url') - ->placeholder('https://example.com/message?token=') - ->maxLength(2000) - ->required() - ->url(), - ]) - ->columnSpanFull(), - Actions::make([ - Action::make('test gotify') - ->label('Test Gotify webhook') - ->action(fn (Get $get) => SendgotifyTestNotification::run(webhooks: $get('gotify_webhooks'))) - ->hidden(fn (Get $get) => ! count($get('gotify_webhooks'))), - ]), - ]), - ]) - ->compact() - ->columnSpan('full'), - - Section::make('Slack') - ->description('⚠️ Slack is deprecated and will be removed in a future release.') - ->schema([ - Toggle::make('slack_enabled') - ->label('Enable Slack webhook notifications') - ->reactive() - ->columnSpanFull(), - Grid::make([ - 'default' => 1, - ]) - ->hidden(fn (Get $get) => $get('slack_enabled') !== true) - ->schema([ - Fieldset::make('Triggers') - ->schema([ - Toggle::make('slack_on_speedtest_run') - ->label('Notify on every speedtest run') - ->columnSpanFull(), - Toggle::make('slack_on_threshold_failure') - ->label('Notify on threshold failures') - ->columnSpanFull(), - ]), - Repeater::make('slack_webhooks') - ->label('Webhooks') - ->schema([ - TextInput::make('url') - ->placeholder('https://hooks.slack.com/services/abc/xyz') - ->maxLength(2000) - ->required() - ->url(), - ]) - ->columnSpanFull(), - Actions::make([ - Action::make('test Slack') - ->label('Test slack webhook') - ->action(fn (Get $get) => SendSlackTestNotification::run(webhooks: $get('slack_webhooks'))) - ->hidden(fn (Get $get) => ! count($get('slack_webhooks'))), - ]), - ]), - ]) - ->compact() - ->columnSpan('full'), - - Section::make('Ntfy') - ->description('⚠️ Ntfy is deprecated and will be removed in a future release.') - ->schema([ - Toggle::make('ntfy_enabled') - ->label('Enable Ntfy webhook notifications') - ->reactive() - ->columnSpanFull(), - Grid::make([ - 'default' => 1, - ]) - ->hidden(fn (Get $get) => $get('ntfy_enabled') !== true) - ->schema([ - Fieldset::make('Triggers') - ->schema([ - Toggle::make('ntfy_on_speedtest_run') - ->label('Notify on every speedtest run') - ->columnSpanFull(), - Toggle::make('ntfy_on_threshold_failure') - ->label('Notify on threshold failures') - ->columnSpanFull(), - ]), - Repeater::make('ntfy_webhooks') - ->label('Webhooks') - ->schema([ - TextInput::make('url') - ->maxLength(2000) - ->placeholder('Your ntfy server url') - ->required() - ->url(), - TextInput::make('topic') - ->label('Topic') - ->placeholder('Your ntfy Topic') - ->maxLength(200) - ->required(), - TextInput::make('username') - ->label('Username') - ->placeholder('Username for Basic Auth (optional)') - ->maxLength(200), - TextInput::make('password') - ->label('Password') - ->placeholder('Password for Basic Auth (optional)') - ->password() - ->maxLength(200), - ]) - ->columnSpanFull(), - Actions::make([ - Action::make('test ntfy') - ->label('Test Ntfy webhook') - ->action(fn (Get $get) => SendNtfyTestNotification::run(webhooks: $get('ntfy_webhooks'))) - ->hidden(fn (Get $get) => ! count($get('ntfy_webhooks'))), - ]), - ]), - ]) - ->compact() - ->columnSpan('full'), - - Section::make('Healthcheck.io') - ->description('⚠️ Healthcheck.io is deprecated and will be removed in a future release.') - ->schema([ - Toggle::make('healthcheck_enabled') - ->label('Enable healthcheck.io webhook notifications') - ->reactive() - ->columnSpanFull(), - Grid::make([ - 'default' => 1, - ]) - ->hidden(fn (Get $get) => $get('healthcheck_enabled') !== true) - ->schema([ - Fieldset::make('Triggers') - ->schema([ - Toggle::make('healthcheck_on_speedtest_run') - ->label('Notify on every speedtest run') - ->columnSpanFull(), - Toggle::make('healthcheck_on_threshold_failure') - ->label('Notify on threshold failures') - ->helperText('Threshold notifications will be sent to the /fail path of the URL.') - ->columnSpanFull(), - ]), - Repeater::make('healthcheck_webhooks') - ->label('webhooks') - ->schema([ - TextInput::make('url') - ->placeholder('https://hc-ping.com/your-uuid-here') - ->maxLength(2000) - ->required() - ->url(), - ]) - ->columnSpanFull(), - Actions::make([ - Action::make('test healthcheck') - ->label('Test healthcheck.io webhook') - ->action(fn (Get $get) => SendHealthCheckTestNotification::run(webhooks: $get('healthcheck_webhooks'))) - ->hidden(fn (Get $get) => ! count($get('healthcheck_webhooks'))), - ]), - ]), - ]) - ->compact() - ->columnSpan('full'), - - Section::make('Telegram') - ->description('⚠️ Telegram is deprecated and will be removed in a future release.') - ->schema([ - Toggle::make('telegram_enabled') - ->label('Enable telegram notifications') - ->reactive() - ->columnSpanFull(), - Grid::make([ - 'default' => 1, - ]) - ->hidden(fn (Get $get) => $get('telegram_enabled') !== true) - ->schema([ - Fieldset::make('Options') - ->schema([ - Toggle::make('telegram_disable_notification') - ->label('Send the message silently to the user') - ->columnSpanFull(), - ]), - Fieldset::make('Triggers') - ->schema([ - Toggle::make('telegram_on_speedtest_run') - ->label('Notify on every speedtest run') - ->columnSpanFull(), - Toggle::make('telegram_on_threshold_failure') - ->label('Notify on threshold failures') - ->columnSpanFull(), - ]), - Repeater::make('telegram_recipients') - ->label('Recipients') - ->schema([ - TextInput::make('telegram_chat_id') - ->placeholder('12345678910') - ->label('Telegram Chat ID') - ->maxLength(50) - ->required(), - ]) - ->columnSpanFull(), - Actions::make([ - Action::make('test telegram') - ->label('Test Telegram channel') - ->action(fn (Get $get) => SendTelegramTestNotification::run(recipients: $get('telegram_recipients'))) - ->hidden(fn (Get $get) => ! count($get('telegram_recipients')) || blank(config('telegram.bot'))), - ]), - ]), - ]) - ->compact() - ->columnSpan('full'), - ]) - ->columnSpan([ - 'md' => 2, - ]), - ]), ]); } } diff --git a/app/Listeners/Discord/SendSpeedtestCompletedNotification.php b/app/Listeners/Discord/SendSpeedtestCompletedNotification.php deleted file mode 100644 index b6e5a484b..000000000 --- a/app/Listeners/Discord/SendSpeedtestCompletedNotification.php +++ /dev/null @@ -1,59 +0,0 @@ -discord_enabled) { - return; - } - - if (! $notificationSettings->discord_on_speedtest_run) { - return; - } - - if (! count($notificationSettings->discord_webhooks)) { - Log::warning('Discord urls not found, check Discord notification channel settings.'); - - return; - } - - $payload = [ - 'content' => view('discord.speedtest-completed', [ - 'id' => $event->result->id, - 'service' => Str::title($event->result->service->getLabel()), - 'serverName' => $event->result->server_name, - 'serverId' => $event->result->server_id, - 'isp' => $event->result->isp, - 'ping' => round($event->result->ping).' ms', - 'download' => Number::toBitRate(bits: $event->result->download_bits, precision: 2), - 'upload' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2), - 'packetLoss' => $event->result->packet_loss, - 'speedtest_url' => $event->result->result_url, - 'url' => url('/admin/results'), - ])->render(), - ]; - - foreach ($notificationSettings->discord_webhooks as $url) { - WebhookCall::create() - ->url($url['url']) - ->payload($payload) - ->doNotSign() - ->dispatch(); - } - } -} diff --git a/app/Listeners/Discord/SendSpeedtestThresholdNotification.php b/app/Listeners/Discord/SendSpeedtestThresholdNotification.php deleted file mode 100644 index 50dd18411..000000000 --- a/app/Listeners/Discord/SendSpeedtestThresholdNotification.php +++ /dev/null @@ -1,133 +0,0 @@ -discord_enabled) { - return; - } - - if (! $notificationSettings->discord_on_threshold_failure) { - return; - } - - if (! count($notificationSettings->discord_webhooks)) { - Log::warning('Discord urls not found, check Discord notification channel settings.'); - - return; - } - - $thresholdSettings = new ThresholdSettings; - - if (! $thresholdSettings->absolute_enabled) { - return; - } - - $failed = []; - - if ($thresholdSettings->absolute_download > 0) { - array_push($failed, $this->absoluteDownloadThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - if ($thresholdSettings->absolute_upload > 0) { - array_push($failed, $this->absoluteUploadThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - if ($thresholdSettings->absolute_ping > 0) { - array_push($failed, $this->absolutePingThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - $failed = array_filter($failed); - - if (! count($failed)) { - Log::warning('Failed Discord thresholds not found, won\'t send notification.'); - - return; - } - - $payload = [ - 'content' => view('discord.speedtest-threshold', [ - 'id' => $event->result->id, - 'service' => Str::title($event->result->service->getLabel()), - 'serverName' => $event->result->server_name, - 'serverId' => $event->result->server_id, - 'isp' => $event->result->isp, - 'metrics' => $failed, - 'speedtest_url' => $event->result->result_url, - 'url' => url('/admin/results'), - ])->render(), - ]; - - foreach ($notificationSettings->discord_webhooks as $url) { - WebhookCall::create() - ->url($url['url']) - ->payload($payload) - ->doNotSign() - ->dispatch(); - } - } - - /** - * Build Discord notification if absolute download threshold is breached. - */ - protected function absoluteDownloadThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absoluteDownloadThresholdFailed($thresholdSettings->absolute_download, $event->result->download)) { - return false; - } - - return [ - 'name' => 'Download', - 'threshold' => $thresholdSettings->absolute_download.' Mbps', - 'value' => Number::toBitRate(bits: $event->result->download_bits, precision: 2), - ]; - } - - /** - * Build Discord notification if absolute upload threshold is breached. - */ - protected function absoluteUploadThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absoluteUploadThresholdFailed($thresholdSettings->absolute_upload, $event->result->upload)) { - return false; - } - - return [ - 'name' => 'Upload', - 'threshold' => $thresholdSettings->absolute_upload.' Mbps', - 'value' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2), - ]; - } - - /** - * Build Discord notification if absolute ping threshold is breached. - */ - protected function absolutePingThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absolutePingThresholdFailed($thresholdSettings->absolute_ping, $event->result->ping)) { - return false; - } - - return [ - 'name' => 'Ping', - 'threshold' => $thresholdSettings->absolute_ping.' ms', - 'value' => round($event->result->ping, 2).' ms', - ]; - } -} diff --git a/app/Listeners/Gotify/SendSpeedtestCompletedNotification.php b/app/Listeners/Gotify/SendSpeedtestCompletedNotification.php deleted file mode 100644 index 13f3d2cb8..000000000 --- a/app/Listeners/Gotify/SendSpeedtestCompletedNotification.php +++ /dev/null @@ -1,64 +0,0 @@ -gotify_enabled) { - return; - } - - if (! $notificationSettings->gotify_on_speedtest_run) { - return; - } - - if (! count($notificationSettings->gotify_webhooks)) { - Log::warning('Gotify urls not found, check Gotify notification channel settings.'); - - return; - } - - $payload = [ - 'message' => view('gotify.speedtest-completed', [ - 'id' => $event->result->id, - 'service' => Str::title($event->result->service->getLabel()), - 'serverName' => $event->result->server_name, - 'serverId' => $event->result->server_id, - 'isp' => $event->result->isp, - 'ping' => round($event->result->ping).' ms', - 'download' => Number::toBitRate(bits: $event->result->download_bits, precision: 2), - 'upload' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2), - 'packetLoss' => $event->result->packet_loss, - 'speedtest_url' => $event->result->result_url, - 'url' => url('/admin/results'), - ])->render(), - 'extras' => [ - 'client::display' => [ - 'contentType' => 'text/markdown', - ], - ], - ]; - - foreach ($notificationSettings->gotify_webhooks as $url) { - WebhookCall::create() - ->url($url['url']) - ->payload($payload) - ->doNotSign() - ->dispatch(); - } - } -} diff --git a/app/Listeners/Gotify/SendSpeedtestThresholdNotification.php b/app/Listeners/Gotify/SendSpeedtestThresholdNotification.php deleted file mode 100644 index 690f565e7..000000000 --- a/app/Listeners/Gotify/SendSpeedtestThresholdNotification.php +++ /dev/null @@ -1,138 +0,0 @@ -gotify_enabled) { - return; - } - - if (! $notificationSettings->gotify_on_threshold_failure) { - return; - } - - if (! count($notificationSettings->gotify_webhooks)) { - Log::warning('Gotify urls not found, check gotify notification channel settings.'); - - return; - } - - $thresholdSettings = new ThresholdSettings; - - if (! $thresholdSettings->absolute_enabled) { - return; - } - - $failed = []; - - if ($thresholdSettings->absolute_download > 0) { - array_push($failed, $this->absoluteDownloadThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - if ($thresholdSettings->absolute_upload > 0) { - array_push($failed, $this->absoluteUploadThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - if ($thresholdSettings->absolute_ping > 0) { - array_push($failed, $this->absolutePingThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - $failed = array_filter($failed); - - if (! count($failed)) { - Log::warning('Failed Gotify thresholds not found, won\'t send notification.'); - - return; - } - - $payload = [ - 'message' => view('gotify.speedtest-threshold', [ - 'id' => $event->result->id, - 'service' => Str::title($event->result->service->getLabel()), - 'serverName' => $event->result->server_name, - 'serverId' => $event->result->server_id, - 'isp' => $event->result->isp, - 'metrics' => $failed, - 'speedtest_url' => $event->result->result_url, - 'url' => url('/admin/results'), - ])->render(), - 'extras' => [ - 'client::display' => [ - 'contentType' => 'text/markdown', - ], - ], - ]; - - foreach ($notificationSettings->gotify_webhooks as $url) { - WebhookCall::create() - ->url($url['url']) - ->payload($payload) - ->doNotSign() - ->dispatch(); - } - } - - /** - * Build gotify notification if absolute download threshold is breached. - */ - protected function absoluteDownloadThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absoluteDownloadThresholdFailed($thresholdSettings->absolute_download, $event->result->download)) { - return false; - } - - return [ - 'name' => 'Download', - 'threshold' => $thresholdSettings->absolute_download.' Mbps', - 'value' => Number::toBitRate(bits: $event->result->download_bits, precision: 2), - ]; - } - - /** - * Build gotify notification if absolute upload threshold is breached. - */ - protected function absoluteUploadThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absoluteUploadThresholdFailed($thresholdSettings->absolute_upload, $event->result->upload)) { - return false; - } - - return [ - 'name' => 'Upload', - 'threshold' => $thresholdSettings->absolute_upload.' Mbps', - 'value' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2), - ]; - } - - /** - * Build gotify notification if absolute ping threshold is breached. - */ - protected function absolutePingThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absolutePingThresholdFailed($thresholdSettings->absolute_ping, $event->result->ping)) { - return false; - } - - return [ - 'name' => 'Ping', - 'threshold' => $thresholdSettings->absolute_ping.' ms', - 'value' => round($event->result->ping, 2).' ms', - ]; - } -} diff --git a/app/Listeners/HealthCheck/SendSpeedtestCompletedNotification.php b/app/Listeners/HealthCheck/SendSpeedtestCompletedNotification.php deleted file mode 100644 index 4b9ae48d2..000000000 --- a/app/Listeners/HealthCheck/SendSpeedtestCompletedNotification.php +++ /dev/null @@ -1,51 +0,0 @@ -healthcheck_enabled) { - return; - } - - if (! $notificationSettings->healthcheck_on_speedtest_run) { - return; - } - - if (! count($notificationSettings->healthcheck_webhooks)) { - Log::warning('healthcheck urls not found, check healthcheck notification channel settings.'); - - return; - } - - foreach ($notificationSettings->healthcheck_webhooks as $url) { - WebhookCall::create() - ->url($url['url']) - ->payload([ - 'result_id' => $event->result->id, - 'site_name' => config('app.name'), - 'isp' => $event->result->isp, - 'ping' => $event->result->ping, - 'download' => $event->result->downloadBits, - 'upload' => $event->result->uploadBits, - 'packetLoss' => $event->result->packet_loss, - 'speedtest_url' => $event->result->result_url, - 'url' => url('/admin/results'), - ]) - ->doNotSign() - ->dispatch(); - } - } -} diff --git a/app/Listeners/HealthCheck/SendSpeedtestThresholdNotification.php b/app/Listeners/HealthCheck/SendSpeedtestThresholdNotification.php deleted file mode 100644 index 4b48fc25b..000000000 --- a/app/Listeners/HealthCheck/SendSpeedtestThresholdNotification.php +++ /dev/null @@ -1,126 +0,0 @@ -healthcheck_enabled) { - return; - } - - if (! $notificationSettings->healthcheck_on_threshold_failure) { - return; - } - - if (! count($notificationSettings->healthcheck_webhooks)) { - Log::warning('HealthCheck urls not found, check healthcheck notification channel settings.'); - - return; - } - - $thresholdSettings = new ThresholdSettings; - - if (! $thresholdSettings->absolute_enabled) { - return; - } - - $failed = []; - - if ($thresholdSettings->absolute_download > 0) { - array_push($failed, $this->absoluteDownloadThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - if ($thresholdSettings->absolute_upload > 0) { - array_push($failed, $this->absoluteUploadThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - if ($thresholdSettings->absolute_ping > 0) { - array_push($failed, $this->absolutePingThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - $failed = array_filter($failed); - - if (! count($failed)) { - Log::warning('Failed healthcheck thresholds not found, won\'t send notification.'); - - return; - } - - foreach ($notificationSettings->healthcheck_webhooks as $url) { - WebhookCall::create() - ->url($url['url'].'/fail') - ->payload([ - 'result_id' => $event->result->id, - 'site_name' => config('app.name'), - 'isp' => $event->result->isp, - 'metrics' => $failed, - 'speedtest_url' => $event->result->result_url, - 'url' => url('/admin/results'), - ]) - ->doNotSign() - ->dispatch(); - } - } - - /** - * Build HealthCheck notification if absolute download threshold is breached. - */ - protected function absoluteDownloadThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absoluteDownloadThresholdFailed($thresholdSettings->absolute_download, $event->result->download)) { - return false; - } - - return [ - 'name' => 'Download', - 'threshold' => $thresholdSettings->absolute_download.' Mbps', - 'value' => Number::toBitRate(bits: $event->result->download_bits, precision: 2), - ]; - } - - /** - * Build Healthcheck notification if absolute upload threshold is breached. - */ - protected function absoluteUploadThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absoluteUploadThresholdFailed($thresholdSettings->absolute_upload, $event->result->upload)) { - return false; - } - - return [ - 'name' => 'Upload', - 'threshold' => $thresholdSettings->absolute_upload.' Mbps', - 'value' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2), - ]; - } - - /** - * Build Healthcheck notification if absolute ping threshold is breached. - */ - protected function absolutePingThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absolutePingThresholdFailed($thresholdSettings->absolute_ping, $event->result->ping)) { - return false; - } - - return [ - 'name' => 'Ping', - 'threshold' => $thresholdSettings->absolute_ping.' ms', - 'value' => round($event->result->ping, 2).' ms', - ]; - } -} diff --git a/app/Listeners/Ntfy/SendSpeedtestCompletedNotification.php b/app/Listeners/Ntfy/SendSpeedtestCompletedNotification.php deleted file mode 100644 index 08052c0e5..000000000 --- a/app/Listeners/Ntfy/SendSpeedtestCompletedNotification.php +++ /dev/null @@ -1,69 +0,0 @@ -ntfy_enabled) { - return; - } - - if (! $notificationSettings->ntfy_on_speedtest_run) { - return; - } - - if (! count($notificationSettings->ntfy_webhooks)) { - Log::warning('Ntfy urls not found, check Ntfy notification channel settings.'); - - return; - } - - $payload = - view('ntfy.speedtest-completed', [ - 'id' => $event->result->id, - 'service' => Str::title($event->result->service->getLabel()), - 'serverName' => $event->result->server_name, - 'serverId' => $event->result->server_id, - 'isp' => $event->result->isp, - 'ping' => round($event->result->ping).' ms', - 'download' => Number::toBitRate(bits: $event->result->download_bits, precision: 2), - 'upload' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2), - 'packetLoss' => $event->result->packet_loss, - 'speedtest_url' => $event->result->result_url, - 'url' => url('/admin/results'), - ])->render(); - - foreach ($notificationSettings->ntfy_webhooks as $url) { - $webhookCall = WebhookCall::create() - ->url($url['url']) - ->payload([ - 'topic' => $url['topic'], - 'message' => $payload, - ]) - ->doNotSign(); - - // Only add authentication if username and password are provided - if (! empty($url['username']) && ! empty($url['password'])) { - $authHeader = 'Basic '.base64_encode($url['username'].':'.$url['password']); - $webhookCall->withHeaders([ - 'Authorization' => $authHeader, - ]); - } - $webhookCall->dispatch(); - } - } -} diff --git a/app/Listeners/Ntfy/SendSpeedtestThresholdNotification.php b/app/Listeners/Ntfy/SendSpeedtestThresholdNotification.php deleted file mode 100644 index 67ed5312a..000000000 --- a/app/Listeners/Ntfy/SendSpeedtestThresholdNotification.php +++ /dev/null @@ -1,144 +0,0 @@ -ntfy_enabled) { - return; - } - - if (! $notificationSettings->ntfy_on_threshold_failure) { - return; - } - - if (! count($notificationSettings->ntfy_webhooks)) { - Log::warning('Ntfy urls not found, check Ntfy notification channel settings.'); - - return; - } - - $thresholdSettings = new ThresholdSettings; - - if (! $thresholdSettings->absolute_enabled) { - return; - } - - $failed = []; - - if ($thresholdSettings->absolute_download > 0) { - array_push($failed, $this->absoluteDownloadThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - if ($thresholdSettings->absolute_upload > 0) { - array_push($failed, $this->absoluteUploadThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - if ($thresholdSettings->absolute_ping > 0) { - array_push($failed, $this->absolutePingThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - $failed = array_filter($failed); - - if (! count($failed)) { - Log::warning('Failed ntfy thresholds not found, won\'t send notification.'); - - return; - } - - $payload = - view('ntfy.speedtest-threshold', [ - 'id' => $event->result->id, - 'service' => Str::title($event->result->service->getLabel()), - 'serverName' => $event->result->server_name, - 'serverId' => $event->result->server_id, - 'isp' => $event->result->isp, - 'metrics' => $failed, - 'speedtest_url' => $event->result->result_url, - 'url' => url('/admin/results'), - ])->render(); - - foreach ($notificationSettings->ntfy_webhooks as $url) { - $webhookCall = WebhookCall::create() - ->url($url['url']) - ->payload([ - 'topic' => $url['topic'], - 'message' => $payload, - ]) - ->doNotSign(); - - // Only add authentication if username and password are provided - if (! empty($url['username']) && ! empty($url['password'])) { - $authHeader = 'Basic '.base64_encode($url['username'].':'.$url['password']); - $webhookCall->withHeaders([ - 'Authorization' => $authHeader, - ]); - } - - $webhookCall->dispatch(); - } - } - - /** - * Build Ntfy notification if absolute download threshold is breached. - */ - protected function absoluteDownloadThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absoluteDownloadThresholdFailed($thresholdSettings->absolute_download, $event->result->download)) { - return false; - } - - return [ - 'name' => 'Download', - 'threshold' => $thresholdSettings->absolute_download.' Mbps', - 'value' => Number::toBitRate(bits: $event->result->download_bits, precision: 2), - ]; - } - - /** - * Build Ntfy notification if absolute upload threshold is breached. - */ - protected function absoluteUploadThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absoluteUploadThresholdFailed($thresholdSettings->absolute_upload, $event->result->upload)) { - return false; - } - - return [ - 'name' => 'Upload', - 'threshold' => $thresholdSettings->absolute_upload.' Mbps', - 'value' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2), - ]; - } - - /** - * Build Ntfy notification if absolute ping threshold is breached. - */ - protected function absolutePingThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absolutePingThresholdFailed($thresholdSettings->absolute_ping, $event->result->ping)) { - return false; - } - - return [ - 'name' => 'Ping', - 'threshold' => $thresholdSettings->absolute_ping.' ms', - 'value' => round($event->result->ping, 2).' ms', - ]; - } -} diff --git a/app/Listeners/Pushover/SendSpeedtestCompletedNotification.php b/app/Listeners/Pushover/SendSpeedtestCompletedNotification.php deleted file mode 100644 index c7e55d000..000000000 --- a/app/Listeners/Pushover/SendSpeedtestCompletedNotification.php +++ /dev/null @@ -1,63 +0,0 @@ -pushover_enabled) { - return; - } - - if (! $notificationSettings->pushover_on_speedtest_run) { - return; - } - - if (! count($notificationSettings->pushover_webhooks)) { - Log::warning('Pushover urls not found, check Pushover notification channel settings.'); - - return; - } - - $payload = [ - view('pushover.speedtest-completed', [ - 'id' => $event->result->id, - 'service' => Str::title($event->result->service->getLabel()), - 'serverName' => $event->result->server_name, - 'serverId' => $event->result->server_id, - 'isp' => $event->result->isp, - 'ping' => round($event->result->ping).' ms', - 'download' => Number::toBitRate(bits: $event->result->download_bits, precision: 2), - 'upload' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2), - 'packetLoss' => $event->result->packet_loss, - 'speedtest_url' => $event->result->result_url, - 'url' => url('/admin/results'), - ])->render(), - ]; - - foreach ($notificationSettings->pushover_webhooks as $url) { - WebhookCall::create() - ->url($url['url']) - ->payload([ - 'token' => $url['api_token'], - 'user' => $url['user_key'], - 'message' => $payload, - ]) - ->doNotSign() - ->dispatch(); - } - } -} diff --git a/app/Listeners/Pushover/SendSpeedtestThresholdNotification.php b/app/Listeners/Pushover/SendSpeedtestThresholdNotification.php deleted file mode 100644 index 52b964c7b..000000000 --- a/app/Listeners/Pushover/SendSpeedtestThresholdNotification.php +++ /dev/null @@ -1,137 +0,0 @@ -pushover_enabled) { - return; - } - - if (! $notificationSettings->pushover_on_threshold_failure) { - return; - } - - if (! count($notificationSettings->pushover_webhooks)) { - Log::warning('Pushover urls not found, check Pushover notification channel settings.'); - - return; - } - - $thresholdSettings = new ThresholdSettings; - - if (! $thresholdSettings->absolute_enabled) { - return; - } - - $failed = []; - - if ($thresholdSettings->absolute_download > 0) { - array_push($failed, $this->absoluteDownloadThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - if ($thresholdSettings->absolute_upload > 0) { - array_push($failed, $this->absoluteUploadThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - if ($thresholdSettings->absolute_ping > 0) { - array_push($failed, $this->absolutePingThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - $failed = array_filter($failed); - - if (! count($failed)) { - Log::warning('Failed Pushover thresholds not found, won\'t send notification.'); - - return; - } - - $payload = [ - view('pushover.speedtest-threshold', [ - 'id' => $event->result->id, - 'service' => Str::title($event->result->service->getLabel()), - 'serverName' => $event->result->server_name, - 'serverId' => $event->result->server_id, - 'isp' => $event->result->isp, - 'metrics' => $failed, - 'speedtest_url' => $event->result->result_url, - 'url' => url('/admin/results'), - ])->render(), - ]; - - foreach ($notificationSettings->pushover_webhooks as $url) { - WebhookCall::create() - ->url($url['url']) - ->payload([ - 'token' => $url['api_token'], - 'user' => $url['user_key'], - 'message' => $payload, - ]) - ->doNotSign() - ->dispatch(); - } - } - - /** - * Build Pushover notification if absolute download threshold is breached. - */ - protected function absoluteDownloadThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absoluteDownloadThresholdFailed($thresholdSettings->absolute_download, $event->result->download)) { - return false; - } - - return [ - 'name' => 'Download', - 'threshold' => $thresholdSettings->absolute_download.' Mbps', - 'value' => Number::toBitRate(bits: $event->result->download_bits, precision: 2), - ]; - } - - /** - * Build Pushover notification if absolute upload threshold is breached. - */ - protected function absoluteUploadThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absoluteUploadThresholdFailed($thresholdSettings->absolute_upload, $event->result->upload)) { - return false; - } - - return [ - 'name' => 'Upload', - 'threshold' => $thresholdSettings->absolute_upload.' Mbps', - 'value' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2), - ]; - } - - /** - * Build Pushover notification if absolute ping threshold is breached. - */ - protected function absolutePingThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absolutePingThresholdFailed($thresholdSettings->absolute_ping, $event->result->ping)) { - return false; - } - - return [ - 'name' => 'Ping', - 'threshold' => $thresholdSettings->absolute_ping.' ms', - 'value' => round($event->result->ping, 2).' ms', - ]; - } -} diff --git a/app/Listeners/Slack/SendSpeedtestCompletedNotification.php b/app/Listeners/Slack/SendSpeedtestCompletedNotification.php deleted file mode 100644 index 54d7439a0..000000000 --- a/app/Listeners/Slack/SendSpeedtestCompletedNotification.php +++ /dev/null @@ -1,59 +0,0 @@ -slack_enabled) { - return; - } - - if (! $notificationSettings->slack_on_speedtest_run) { - return; - } - - if (! count($notificationSettings->slack_webhooks)) { - Log::warning('Slack URLs not found, check Slack notification channel settings.'); - - return; - } - - $payload = [ - 'text' => view('slack.speedtest-completed', [ - 'id' => $event->result->id, - 'service' => Str::title($event->result->service->getLabel()), - 'serverName' => $event->result->server_name, - 'serverId' => $event->result->server_id, - 'isp' => $event->result->isp, - 'ping' => round($event->result->ping).' ms', - 'download' => Number::toBitRate(bits: $event->result->download_bits, precision: 2), - 'upload' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2), - 'packetLoss' => $event->result->packet_loss, - 'speedtest_url' => $event->result->result_url, - 'url' => url('/admin/results'), - ])->render(), - ]; - - foreach ($notificationSettings->slack_webhooks as $url) { - WebhookCall::create() - ->url($url['url']) - ->payload($payload) - ->doNotSign() - ->dispatch(); - } - } -} diff --git a/app/Listeners/Slack/SendSpeedtestThresholdNotification.php b/app/Listeners/Slack/SendSpeedtestThresholdNotification.php deleted file mode 100644 index d5f6a748d..000000000 --- a/app/Listeners/Slack/SendSpeedtestThresholdNotification.php +++ /dev/null @@ -1,133 +0,0 @@ -slack_enabled) { - return; - } - - if (! $notificationSettings->slack_on_threshold_failure) { - return; - } - - if (! count($notificationSettings->slack_webhooks)) { - Log::warning('Slack urls not found, check Slack notification channel settings.'); - - return; - } - - $thresholdSettings = new ThresholdSettings; - - if (! $thresholdSettings->absolute_enabled) { - return; - } - - $failed = []; - - if ($thresholdSettings->absolute_download > 0) { - array_push($failed, $this->absoluteDownloadThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - if ($thresholdSettings->absolute_upload > 0) { - array_push($failed, $this->absoluteUploadThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - if ($thresholdSettings->absolute_ping > 0) { - array_push($failed, $this->absolutePingThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - $failed = array_filter($failed); - - if (! count($failed)) { - Log::warning('Failed Slack thresholds not found, won\'t send notification.'); - - return; - } - - $payload = [ - 'text' => view('slack.speedtest-threshold', [ - 'id' => $event->result->id, - 'service' => Str::title($event->result->service->getLabel()), - 'serverName' => $event->result->server_name, - 'serverId' => $event->result->server_id, - 'isp' => $event->result->isp, - 'metrics' => $failed, - 'speedtest_url' => $event->result->result_url, - 'url' => url('/admin/results'), - ])->render(), - ]; - - foreach ($notificationSettings->slack_webhooks as $url) { - WebhookCall::create() - ->url($url['url']) - ->payload($payload) - ->doNotSign() - ->dispatch(); - } - } - - /** - * Build Slack notification if absolute download threshold is breached. - */ - protected function absoluteDownloadThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absoluteDownloadThresholdFailed($thresholdSettings->absolute_download, $event->result->download)) { - return false; - } - - return [ - 'name' => 'Download', - 'threshold' => $thresholdSettings->absolute_download.' Mbps', - 'value' => Number::toBitRate(bits: $event->result->download_bits, precision: 2), - ]; - } - - /** - * Build Slack notification if absolute upload threshold is breached. - */ - protected function absoluteUploadThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absoluteUploadThresholdFailed($thresholdSettings->absolute_upload, $event->result->upload)) { - return false; - } - - return [ - 'name' => 'Upload', - 'threshold' => $thresholdSettings->absolute_upload.' Mbps', - 'value' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2), - ]; - } - - /** - * Build Slack notification if absolute ping threshold is breached. - */ - protected function absolutePingThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absolutePingThresholdFailed($thresholdSettings->absolute_ping, $event->result->ping)) { - return false; - } - - return [ - 'name' => 'Ping', - 'threshold' => $thresholdSettings->absolute_ping.' ms', - 'value' => round($event->result->ping, 2).' ms', - ]; - } -} diff --git a/app/Listeners/Telegram/SendSpeedtestCompletedNotification.php b/app/Listeners/Telegram/SendSpeedtestCompletedNotification.php deleted file mode 100644 index ee269799c..000000000 --- a/app/Listeners/Telegram/SendSpeedtestCompletedNotification.php +++ /dev/null @@ -1,55 +0,0 @@ -telegram_enabled) { - return; - } - - if (! $notificationSettings->telegram_on_speedtest_run) { - return; - } - - if (! count($notificationSettings->telegram_recipients)) { - Log::warning('Telegram recipients not found, check Telegram notification channel settings.'); - - return; - } - - $content = view('telegram.speedtest-completed', [ - 'id' => $event->result->id, - 'service' => Str::title($event->result->service->getLabel()), - 'serverName' => $event->result->server_name, - 'serverId' => $event->result->server_id, - 'isp' => $event->result->isp, - 'ping' => round($event->result->ping).' ms', - 'download' => Number::toBitRate(bits: $event->result->download_bits, precision: 2), - 'upload' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2), - 'packetLoss' => is_numeric($event->result->packet_loss) ? round($event->result->packet_loss, 2) : 'n/a', - 'speedtest_url' => $event->result->result_url, - 'url' => url('/admin/results'), - ])->render(); - - foreach ($notificationSettings->telegram_recipients as $recipient) { - Notification::route('telegram_chat_id', $recipient['telegram_chat_id']) - ->notify(new SpeedtestNotification($content, $notificationSettings->telegram_disable_notification)); - } - } -} diff --git a/app/Listeners/Telegram/SendSpeedtestThresholdNotification.php b/app/Listeners/Telegram/SendSpeedtestThresholdNotification.php deleted file mode 100644 index dcb4aa87d..000000000 --- a/app/Listeners/Telegram/SendSpeedtestThresholdNotification.php +++ /dev/null @@ -1,129 +0,0 @@ -telegram_enabled) { - return; - } - - if (! $notificationSettings->telegram_on_threshold_failure) { - return; - } - - if (! count($notificationSettings->telegram_recipients) > 0) { - Log::warning('Telegram recipients not found, check Telegram notification channel settings.'); - - return; - } - - $thresholdSettings = new ThresholdSettings; - - if (! $thresholdSettings->absolute_enabled) { - return; - } - - $failed = []; - - if ($thresholdSettings->absolute_download > 0) { - array_push($failed, $this->absoluteDownloadThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - if ($thresholdSettings->absolute_upload > 0) { - array_push($failed, $this->absoluteUploadThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - if ($thresholdSettings->absolute_ping > 0) { - array_push($failed, $this->absolutePingThreshold(event: $event, thresholdSettings: $thresholdSettings)); - } - - $failed = array_filter($failed); - - if (! count($failed)) { - Log::warning('Failed Telegram thresholds not found, won\'t send notification.'); - - return; - } - - $content = view('telegram.speedtest-threshold', [ - 'id' => $event->result->id, - 'service' => Str::title($event->result->service->getLabel()), - 'serverName' => $event->result->server_name, - 'serverId' => $event->result->server_id, - 'isp' => $event->result->isp, - 'metrics' => $failed, - 'speedtest_url' => $event->result->result_url, - 'url' => url('/admin/results'), - ])->render(); - - foreach ($notificationSettings->telegram_recipients as $recipient) { - Notification::route('telegram_chat_id', $recipient['telegram_chat_id']) - ->notify(new SpeedtestNotification($content, $notificationSettings->telegram_disable_notification)); - } - } - - /** - * Build Telegram notification if absolute download threshold is breached. - */ - protected function absoluteDownloadThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absoluteDownloadThresholdFailed($thresholdSettings->absolute_download, $event->result->download)) { - return false; - } - - return [ - 'name' => 'Download', - 'threshold' => $thresholdSettings->absolute_download.' Mbps', - 'value' => Number::toBitRate(bits: $event->result->download_bits, precision: 2), - ]; - } - - /** - * Build Telegram notification if absolute upload threshold is breached. - */ - protected function absoluteUploadThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absoluteUploadThresholdFailed($thresholdSettings->absolute_upload, $event->result->upload)) { - return false; - } - - return [ - 'name' => 'Upload', - 'threshold' => $thresholdSettings->absolute_upload.' Mbps', - 'value' => Number::toBitRate(bits: $event->result->upload_bits, precision: 2), - ]; - } - - /** - * Build Telegram notification if absolute ping threshold is breached. - */ - protected function absolutePingThreshold(SpeedtestCompleted $event, ThresholdSettings $thresholdSettings): bool|array - { - if (! absolutePingThresholdFailed($thresholdSettings->absolute_ping, $event->result->ping)) { - return false; - } - - return [ - 'name' => 'Ping', - 'threshold' => $thresholdSettings->absolute_ping.' ms', - 'value' => round($event->result->ping, 2).' ms', - ]; - } -} diff --git a/app/Livewire/DeprecatedNotificationChannelsBanner.php b/app/Livewire/DeprecatedNotificationChannelsBanner.php index 84533de19..2cca96eed 100644 --- a/app/Livewire/DeprecatedNotificationChannelsBanner.php +++ b/app/Livewire/DeprecatedNotificationChannelsBanner.php @@ -2,63 +2,10 @@ 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'); diff --git a/app/Notifications/Telegram/SpeedtestNotification.php b/app/Notifications/Telegram/SpeedtestNotification.php deleted file mode 100644 index 5317f7bf9..000000000 --- a/app/Notifications/Telegram/SpeedtestNotification.php +++ /dev/null @@ -1,44 +0,0 @@ - - */ - public function via(object $notifiable): array - { - return ['telegram']; - } - - /** - * Get the Telegram message representation of the notification. - * - * @param mixed $notifiable - */ - public function toTelegram($notifiable): TelegramMessage - { - return TelegramMessage::create() - ->to($notifiable->routes['telegram_chat_id']) - ->content($this->content) - ->disableNotification($this->disableNotification); - } -} diff --git a/app/Notifications/Telegram/TestNotification.php b/app/Notifications/Telegram/TestNotification.php deleted file mode 100644 index 111ddc47d..000000000 --- a/app/Notifications/Telegram/TestNotification.php +++ /dev/null @@ -1,49 +0,0 @@ -settings = new NotificationSettings; - } - - /** - * Get the notification's delivery channels. - * - * @return array - */ - public function via(object $notifiable): array - { - return ['telegram']; - } - - /** - * Get the Telegram representation of the notification. - * - * @return array - */ - public function toTelegram(object $notifiable): TelegramMessage - { - return TelegramMessage::create() - ->to($notifiable->routes['telegram_chat_id']) - ->disableNotification($this->settings->telegram_disable_notification) - ->content('👋 Testing the Telegram notification channel.'); - } -} diff --git a/app/Settings/NotificationSettings.php b/app/Settings/NotificationSettings.php index 0f332c68b..47b6e0335 100644 --- a/app/Settings/NotificationSettings.php +++ b/app/Settings/NotificationSettings.php @@ -20,16 +20,6 @@ class NotificationSettings extends Settings public ?array $mail_recipients; - public bool $telegram_enabled; - - public bool $telegram_disable_notification; - - public bool $telegram_on_speedtest_run; - - public bool $telegram_on_threshold_failure; - - public ?array $telegram_recipients; - public bool $webhook_enabled; public bool $webhook_on_speedtest_run; @@ -38,54 +28,6 @@ class NotificationSettings extends Settings public ?array $webhook_urls; - public bool $discord_enabled; - - public bool $discord_on_speedtest_run; - - public bool $discord_on_threshold_failure; - - public ?array $discord_webhooks; - - public bool $ntfy_enabled; - - public bool $ntfy_on_speedtest_run; - - public bool $ntfy_on_threshold_failure; - - public ?array $ntfy_webhooks; - - public bool $pushover_enabled; - - public bool $pushover_on_speedtest_run; - - public bool $pushover_on_threshold_failure; - - public ?array $pushover_webhooks; - - public bool $healthcheck_enabled; - - public bool $healthcheck_on_speedtest_run; - - public bool $healthcheck_on_threshold_failure; - - public ?array $healthcheck_webhooks; - - public bool $slack_enabled; - - public bool $slack_on_speedtest_run; - - public bool $slack_on_threshold_failure; - - public ?array $slack_webhooks; - - public bool $gotify_enabled; - - public bool $gotify_on_speedtest_run; - - public bool $gotify_on_threshold_failure; - - public ?array $gotify_webhooks; - public bool $apprise_enabled; public ?string $apprise_server_url; diff --git a/composer.json b/composer.json index 4fe2349e4..1e3730b7d 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,6 @@ "filament/filament": "4.1.0", "filament/spatie-laravel-settings-plugin": "^4.1", "influxdata/influxdb-client-php": "^3.8", - "laravel-notification-channels/telegram": "^6.0", "laravel/framework": "^12.41.1", "laravel/prompts": "^0.3.8", "laravel/sanctum": "^4.2.1", diff --git a/composer.lock b/composer.lock index 6c492d7d9..e20a33ccf 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "374762e19dbfc99374c14f3f12a4ae3e", + "content-hash": "0a9782dcef4c31a1240deaa25a17b484", "packages": [ { "name": "anourvalar/eloquent-serialize", @@ -2365,78 +2365,6 @@ }, "time": "2025-11-13T14:57:49+00:00" }, - { - "name": "laravel-notification-channels/telegram", - "version": "6.0.0", - "source": { - "type": "git", - "url": "https://github.com/laravel-notification-channels/telegram.git", - "reference": "289eb825f6c918b21bbda19bffb900d882c9647a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel-notification-channels/telegram/zipball/289eb825f6c918b21bbda19bffb900d882c9647a", - "reference": "289eb825f6c918b21bbda19bffb900d882c9647a", - "shasum": "" - }, - "require": { - "ext-json": "*", - "guzzlehttp/guzzle": "^7.8", - "illuminate/contracts": "^11.0 || ^12.0", - "illuminate/notifications": "^11.0 || ^12.0", - "illuminate/support": "^11.0 || ^12.0", - "php": "^8.2" - }, - "require-dev": { - "larastan/larastan": "^3.0", - "mockery/mockery": "^1.4.4", - "orchestra/testbench": "^10.0", - "pestphp/pest": "^3.0", - "pestphp/pest-plugin-laravel": "^3.0", - "phpstan/extension-installer": "^1.2", - "phpstan/phpstan-deprecation-rules": "^2.0", - "phpstan/phpstan-phpunit": "^2.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "NotificationChannels\\Telegram\\TelegramServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "NotificationChannels\\Telegram\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Irfaq Syed", - "email": "github@lukonet.net", - "homepage": "https://lukonet.com", - "role": "Developer" - } - ], - "description": "Telegram Notifications Channel for Laravel", - "homepage": "https://github.com/laravel-notification-channels/telegram", - "keywords": [ - "laravel", - "notification", - "telegram", - "telegram notification", - "telegram notifications channel" - ], - "support": { - "issues": "https://github.com/laravel-notification-channels/telegram/issues", - "source": "https://github.com/laravel-notification-channels/telegram/tree/6.0.0" - }, - "time": "2025-02-25T22:59:13+00:00" - }, { "name": "laravel/framework", "version": "v12.41.1", diff --git a/config/services.php b/config/services.php index c7f3bddd7..5c8e81a64 100644 --- a/config/services.php +++ b/config/services.php @@ -2,10 +2,6 @@ return [ - 'telegram-bot-api' => [ - 'token' => env('TELEGRAM_BOT_TOKEN'), - ], - 'unifi-api' => [ 'base_url' => env('UNIFI_API_BASE_URL', 'https://192.168.1.1'), 'token' => env('UNIFI_API_TOKEN'), diff --git a/database/settings/2022_12_22_125055_create_telegram_notification_settings.php b/database/settings/2022_12_22_125055_create_telegram_notification_settings.php deleted file mode 100644 index 62ccc37be..000000000 --- a/database/settings/2022_12_22_125055_create_telegram_notification_settings.php +++ /dev/null @@ -1,14 +0,0 @@ -migrator->add('notification.telegram_enabled', false); - $this->migrator->add('notification.telegram_on_speedtest_run', false); - $this->migrator->add('notification.telegram_on_threshold_failure', false); - $this->migrator->add('notification.telegram_recipients', null); - } -} diff --git a/database/settings/2024_02_07_173217_add_telegram_disable_notification_to_notification_settings.php b/database/settings/2024_02_07_173217_add_telegram_disable_notification_to_notification_settings.php deleted file mode 100644 index f06ff9ae8..000000000 --- a/database/settings/2024_02_07_173217_add_telegram_disable_notification_to_notification_settings.php +++ /dev/null @@ -1,11 +0,0 @@ -migrator->add('notification.telegram_disable_notification', false); - } -}; diff --git a/database/settings/2024_02_22_144620_create_healthcheck_notification_settings.php b/database/settings/2024_02_22_144620_create_healthcheck_notification_settings.php deleted file mode 100644 index b5dd742bb..000000000 --- a/database/settings/2024_02_22_144620_create_healthcheck_notification_settings.php +++ /dev/null @@ -1,14 +0,0 @@ -migrator->add('notification.healthcheck_enabled', false); - $this->migrator->add('notification.healthcheck_on_speedtest_run', false); - $this->migrator->add('notification.healthcheck_on_threshold_failure', false); - $this->migrator->add('notification.healthcheck_webhooks', null); - } -}; diff --git a/database/settings/2024_02_22_144650_create_discord_notification_settings.php b/database/settings/2024_02_22_144650_create_discord_notification_settings.php deleted file mode 100644 index 6a3088432..000000000 --- a/database/settings/2024_02_22_144650_create_discord_notification_settings.php +++ /dev/null @@ -1,14 +0,0 @@ -migrator->add('notification.discord_enabled', false); - $this->migrator->add('notification.discord_on_speedtest_run', false); - $this->migrator->add('notification.discord_on_threshold_failure', false); - $this->migrator->add('notification.discord_webhooks', null); - } -}; diff --git a/database/settings/2024_02_22_144650_create_ntfy_notification_settings.php b/database/settings/2024_02_22_144650_create_ntfy_notification_settings.php deleted file mode 100644 index aca36e39f..000000000 --- a/database/settings/2024_02_22_144650_create_ntfy_notification_settings.php +++ /dev/null @@ -1,14 +0,0 @@ -migrator->add('notification.ntfy_enabled', false); - $this->migrator->add('notification.ntfy_on_speedtest_run', false); - $this->migrator->add('notification.ntfy_on_threshold_failure', false); - $this->migrator->add('notification.ntfy_webhooks', null); - } -}; diff --git a/database/settings/2024_02_22_144650_create_slack_notification_settings.php b/database/settings/2024_02_22_144650_create_slack_notification_settings.php deleted file mode 100644 index 755a70b74..000000000 --- a/database/settings/2024_02_22_144650_create_slack_notification_settings.php +++ /dev/null @@ -1,14 +0,0 @@ -migrator->add('notification.slack_enabled', false); - $this->migrator->add('notification.slack_on_speedtest_run', false); - $this->migrator->add('notification.slack_on_threshold_failure', false); - $this->migrator->add('notification.slack_webhooks', null); - } -}; diff --git a/database/settings/2024_02_22_144654_create_gotify_notification_settings.php b/database/settings/2024_02_22_144654_create_gotify_notification_settings.php deleted file mode 100644 index af0d818d7..000000000 --- a/database/settings/2024_02_22_144654_create_gotify_notification_settings.php +++ /dev/null @@ -1,14 +0,0 @@ -migrator->add('notification.gotify_enabled', false); - $this->migrator->add('notification.gotify_on_speedtest_run', false); - $this->migrator->add('notification.gotify_on_threshold_failure', false); - $this->migrator->add('notification.gotify_webhooks', null); - } -}; diff --git a/database/settings/2024_02_22_144680_create_pushover_notification_settings.php b/database/settings/2024_02_22_144680_create_pushover_notification_settings.php deleted file mode 100644 index 92f394001..000000000 --- a/database/settings/2024_02_22_144680_create_pushover_notification_settings.php +++ /dev/null @@ -1,14 +0,0 @@ -migrator->add('notification.pushover_enabled', false); - $this->migrator->add('notification.pushover_on_speedtest_run', false); - $this->migrator->add('notification.pushover_on_threshold_failure', false); - $this->migrator->add('notification.pushover_webhooks', null); - } -}; diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index c66c27c1c..c1aadd6f9 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -1,7 +1,5 @@
- - diff --git a/resources/views/discord/speedtest-completed.blade.php b/resources/views/discord/speedtest-completed.blade.php deleted file mode 100644 index 851a8200a..000000000 --- a/resources/views/discord/speedtest-completed.blade.php +++ /dev/null @@ -1,15 +0,0 @@ -**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 }}**. - -- **Server name:** {{ $serverName }} -- **Server ID:** {{ $serverId }} -- **ISP:** {{ $isp }} -- **Ping:** {{ $ping }} -- **Download:** {{ $download }} -- **Upload:** {{ $upload }} -- **Packet Loss:** {{ $packetLoss }} **%** -- **Ookla Speedtest:** {{ $speedtest_url }} -- **URL:** {{ $url }} diff --git a/resources/views/discord/speedtest-threshold.blade.php b/resources/views/discord/speedtest-threshold.blade.php deleted file mode 100644 index b0716b50b..000000000 --- a/resources/views/discord/speedtest-threshold.blade.php +++ /dev/null @@ -1,11 +0,0 @@ -**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. - -@foreach ($metrics as $item) -- **{{ $item['name'] }}** {{ $item['threshold'] }}: {{ $item['value'] }} -@endforeach -- **Ookla Speedtest:** {{ $speedtest_url }} -- **URL:** {{ $url }} diff --git a/resources/views/gotify/speedtest-completed.blade.php b/resources/views/gotify/speedtest-completed.blade.php deleted file mode 100644 index c17d46daf..000000000 --- a/resources/views/gotify/speedtest-completed.blade.php +++ /dev/null @@ -1,15 +0,0 @@ -**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 }}**. - -- **Server name:** {{ $serverName }} -- **Server ID:** {{ $serverId }} -- **ISP:** {{ $isp }} -- **Ping:** {{ $ping }} -- **Download:** {{ $download }} -- **Upload:** {{ $upload }} -- **Packet Loss:** {{ $packetLoss }} **%** -- **Ookla Speedtest:** [{{ $speedtest_url }}]({{ $speedtest_url }}) -- **URL:** [{{ $url }}]({{ $url }}) diff --git a/resources/views/gotify/speedtest-threshold.blade.php b/resources/views/gotify/speedtest-threshold.blade.php deleted file mode 100644 index e731a0104..000000000 --- a/resources/views/gotify/speedtest-threshold.blade.php +++ /dev/null @@ -1,11 +0,0 @@ -**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. - -@foreach ($metrics as $item) -- {{ $item['name'] }} {{ $item['threshold'] }}: **{{ $item['value'] }}** -@endforeach -- **Ookla Speedtest:** [{{ $speedtest_url }}]({{ $speedtest_url }}) -- **URL:** [{{ $url }}]({{ $url }}) diff --git a/resources/views/livewire/deprecated-notification-channels-banner.blade.php b/resources/views/livewire/deprecated-notification-channels-banner.blade.php index a96ed0441..9e4187668 100644 --- a/resources/views/livewire/deprecated-notification-channels-banner.blade.php +++ b/resources/views/livewire/deprecated-notification-channels-banner.blade.php @@ -1,25 +1,15 @@
- @if ($this->hasDeprecatedChannels) -
-
-
- -
+
+
+
+ +
-
-

- Deprecated Notification Channels -

-
-

- You are currently using the following deprecated notification channels: {{ implode(', ', $this->deprecatedChannelsList) }}. -

-

- These channels will be removed at the end of January 2026. As of that moment you will no longer receive notifications. Please migrate to Apprise which supports all these services and more. -

-
-
+
+

+ Pushover, Discord, Slack, Telegram, Gotify, Ntfy, and Healthcheck.io notification channels are deprecated and no longer work. Please migrate to Apprise for all notification needs. +

- @endif +
diff --git a/resources/views/ntfy/speedtest-completed.blade.php b/resources/views/ntfy/speedtest-completed.blade.php deleted file mode 100644 index 64501e794..000000000 --- a/resources/views/ntfy/speedtest-completed.blade.php +++ /dev/null @@ -1,15 +0,0 @@ -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 }}. - -Server name: {{ $serverName }} -Server ID: {{ $serverId }} -ISP: {{ $isp }} -Ping: {{ $ping }} -Download: {{ $download }} -Upload: {{ $upload }} -Packet Loss: {{ $packetLoss }} % -Ookla Speedtest: {{ $speedtest_url }} -URL: {{ $url }} diff --git a/resources/views/ntfy/speedtest-threshold.blade.php b/resources/views/ntfy/speedtest-threshold.blade.php deleted file mode 100644 index 7e9ef3c93..000000000 --- a/resources/views/ntfy/speedtest-threshold.blade.php +++ /dev/null @@ -1,11 +0,0 @@ -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. - -@foreach ($metrics as $item) -- {{ $item['name'] }} {{ $item['threshold'] }}: {{ $item['value'] }} -@endforeach -- Ookla Speedtest: {{ $speedtest_url }} -- URL: {{ $url }} diff --git a/resources/views/pushover/speedtest-completed.blade.php b/resources/views/pushover/speedtest-completed.blade.php deleted file mode 100644 index dfae02299..000000000 --- a/resources/views/pushover/speedtest-completed.blade.php +++ /dev/null @@ -1,15 +0,0 @@ -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 }}. - -- Server name: {{ $serverName }} -- Server ID: {{ $serverId }} -- ISP: {{ $isp }} -- Ping: {{ $ping }} -- Download: {{ $download }} -- Upload: {{ $upload }} -- Packet Loss: {{ $packetLoss }} % -- Ookla Speedtest: {{ $speedtest_url }} -- URL: {{ $url }} diff --git a/resources/views/pushover/speedtest-threshold.blade.php b/resources/views/pushover/speedtest-threshold.blade.php deleted file mode 100644 index 6f222fa19..000000000 --- a/resources/views/pushover/speedtest-threshold.blade.php +++ /dev/null @@ -1,11 +0,0 @@ -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. - -@foreach ($metrics as $item) -- {{ $item['name'] }} {{ $item['threshold'] }}: {{ $item['value'] }} -@endforeach -- Ookla Speedtest: {{ $speedtest_url }} -- URL: {{ $url }} diff --git a/resources/views/slack/speedtest-completed.blade.php b/resources/views/slack/speedtest-completed.blade.php deleted file mode 100644 index c1abcefc5..000000000 --- a/resources/views/slack/speedtest-completed.blade.php +++ /dev/null @@ -1,15 +0,0 @@ -*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 }}*. - -- *Server name:* {{ $serverName }} -- *Server ID:* {{ $serverId }} -- *ISP:* {{ $isp }} -- *Ping:* {{ $ping }} -- *Download:* {{ $download }} -- *Upload:* {{ $upload }} -- *Packet Loss:* {{ $packetLoss }} *%* -- *Ookla Speedtest:* {{ $speedtest_url }} -- *URL:* {{ $url }} diff --git a/resources/views/slack/speedtest-threshold.blade.php b/resources/views/slack/speedtest-threshold.blade.php deleted file mode 100644 index 2d4a31fc5..000000000 --- a/resources/views/slack/speedtest-threshold.blade.php +++ /dev/null @@ -1,11 +0,0 @@ -*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. - -@foreach ($metrics as $item) -- *{{ $item['name'] }}* {{ $item['threshold'] }}: {{ $item['value'] }} -@endforeach -- *Ookla Speedtest:* {{ $speedtest_url }} -- *URL:* {{ $url }} diff --git a/resources/views/telegram/speedtest-completed.blade.php b/resources/views/telegram/speedtest-completed.blade.php deleted file mode 100644 index ba168cb10..000000000 --- a/resources/views/telegram/speedtest-completed.blade.php +++ /dev/null @@ -1,15 +0,0 @@ -**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 }}*. - -- *Server name:* {{ $serverName }} -- *Server ID:* {{ $serverId }} -- **ISP:** {{ $isp }} -- *Ping:* {{ $ping }} -- *Download:* {{ $download }} -- *Upload:* {{ $upload }} -- **Packet Loss:** {{ $packetLoss }}**%** -- **Ookla Speedtest:** {{ $speedtest_url }} -- **URL:** {{ $url }} diff --git a/resources/views/telegram/speedtest-threshold.blade.php b/resources/views/telegram/speedtest-threshold.blade.php deleted file mode 100644 index 81ef8bb74..000000000 --- a/resources/views/telegram/speedtest-threshold.blade.php +++ /dev/null @@ -1,11 +0,0 @@ -**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. - -@foreach ($metrics as $item) -- **{{ $item['name'] }}** {{ $item['threshold'] }}: {{ $item['value'] }} -@endforeach -- **Ookla Speedtest:** {{ $speedtest_url }} -- **URL:** {{ $url }}