@@ -96,7 +96,95 @@ public function form(Form $form): Form
9696 'md ' => 2 ,
9797 ]),
9898
99+ Section::make ('Mail ' )
100+ ->schema ([
101+ Toggle::make ('mail_enabled ' )
102+ ->label ('Enable mail notifications ' )
103+ ->reactive ()
104+ ->columnSpanFull (),
105+ Grid::make ([
106+ 'default ' => 1 ,
107+ ])
108+ ->hidden (fn (Forms \Get $ get ) => $ get ('mail_enabled ' ) !== true )
109+ ->schema ([
110+ Fieldset::make ('Triggers ' )
111+ ->schema ([
112+ Toggle::make ('mail_on_speedtest_run ' )
113+ ->label ('Notify on every speedtest run ' )
114+ ->columnSpanFull (),
115+ Toggle::make ('mail_on_threshold_failure ' )
116+ ->label ('Notify on threshold failures ' )
117+ ->columnSpanFull (),
118+ ]),
119+ Repeater::make ('mail_recipients ' )
120+ ->label ('Recipients ' )
121+ ->schema ([
122+ Forms \Components \TextInput::make ('email_address ' )
123+ ->
placeholder (
'[email protected] ' )
124+ ->email ()
125+ ->required (),
126+ ])
127+ ->columnSpanFull (),
128+ Actions::make ([
129+ Action::make ('test mail ' )
130+ ->label ('Test mail channel ' )
131+ ->action (fn (Forms \Get $ get ) => SendMailTestNotification::run (recipients: $ get ('mail_recipients ' )))
132+ ->hidden (fn (Forms \Get $ get ) => ! count ($ get ('mail_recipients ' ))),
133+ ]),
134+ ]),
135+ ])
136+ ->compact ()
137+ ->columns ([
138+ 'default ' => 1 ,
139+ 'md ' => 2 ,
140+ ]),
141+
142+ Section::make ('Webhook ' )
143+ ->schema ([
144+ Toggle::make ('webhook_enabled ' )
145+ ->label ('Enable webhook notifications ' )
146+ ->reactive ()
147+ ->columnSpanFull (),
148+ Grid::make ([
149+ 'default ' => 1 ,
150+ ])
151+ ->hidden (fn (Forms \Get $ get ) => $ get ('webhook_enabled ' ) !== true )
152+ ->schema ([
153+ Fieldset::make ('Triggers ' )
154+ ->schema ([
155+ Toggle::make ('webhook_on_speedtest_run ' )
156+ ->label ('Notify on every speedtest run ' )
157+ ->columnSpan (2 ),
158+ Toggle::make ('webhook_on_threshold_failure ' )
159+ ->label ('Notify on threshold failures ' )
160+ ->columnSpan (2 ),
161+ ]),
162+ Repeater::make ('webhook_urls ' )
163+ ->label ('Recipients ' )
164+ ->schema ([
165+ Forms \Components \TextInput::make ('url ' )
166+ ->placeholder ('https://webhook.site/longstringofcharacters ' )
167+ ->maxLength (2000 )
168+ ->required ()
169+ ->url (),
170+ ])
171+ ->columnSpanFull (),
172+ Actions::make ([
173+ Action::make ('test webhook ' )
174+ ->label ('Test webhook channel ' )
175+ ->action (fn (Forms \Get $ get ) => SendWebhookTestNotification::run (webhooks: $ get ('webhook_urls ' )))
176+ ->hidden (fn (Forms \Get $ get ) => ! count ($ get ('webhook_urls ' ))),
177+ ]),
178+ ]),
179+ ])
180+ ->compact ()
181+ ->columns ([
182+ 'default ' => 1 ,
183+ 'md ' => 2 ,
184+ ]),
185+
99186 Section::make ('Pushover ' )
187+ ->description ('⚠️ Pushover is deprecated and will be removed in a future release. ' )
100188 ->schema ([
101189 Toggle::make ('pushover_enabled ' )
102190 ->label ('Enable Pushover webhook notifications ' )
@@ -154,6 +242,7 @@ public function form(Form $form): Form
154242 ]),
155243
156244 Section::make ('Discord ' )
245+ ->description ('⚠️ Discord is deprecated and will be removed in a future release. ' )
157246 ->schema ([
158247 Toggle::make ('discord_enabled ' )
159248 ->label ('Enable Discord webhook notifications ' )
@@ -198,6 +287,7 @@ public function form(Form $form): Form
198287 ]),
199288
200289 Section::make ('Gotify ' )
290+ ->description ('⚠️ Gotify is deprecated and will be removed in a future release. ' )
201291 ->schema ([
202292 Toggle::make ('gotify_enabled ' )
203293 ->label ('Enable Gotify webhook notifications ' )
@@ -242,6 +332,7 @@ public function form(Form $form): Form
242332 ]),
243333
244334 Section::make ('Slack ' )
335+ ->description ('⚠️ Slack is deprecated and will be removed in a future release. ' )
245336 ->schema ([
246337 Toggle::make ('slack_enabled ' )
247338 ->label ('Enable Slack webhook notifications ' )
@@ -286,6 +377,7 @@ public function form(Form $form): Form
286377 ]),
287378
288379 Section::make ('Ntfy ' )
380+ ->description ('⚠️ Ntfy is deprecated and will be removed in a future release. ' )
289381 ->schema ([
290382 Toggle::make ('ntfy_enabled ' )
291383 ->label ('Enable Ntfy webhook notifications ' )
@@ -343,50 +435,8 @@ public function form(Form $form): Form
343435 'md ' => 2 ,
344436 ]),
345437
346- Section::make ('Mail ' )
347- ->schema ([
348- Toggle::make ('mail_enabled ' )
349- ->label ('Enable mail notifications ' )
350- ->reactive ()
351- ->columnSpanFull (),
352- Grid::make ([
353- 'default ' => 1 ,
354- ])
355- ->hidden (fn (Forms \Get $ get ) => $ get ('mail_enabled ' ) !== true )
356- ->schema ([
357- Fieldset::make ('Triggers ' )
358- ->schema ([
359- Toggle::make ('mail_on_speedtest_run ' )
360- ->label ('Notify on every speedtest run ' )
361- ->columnSpanFull (),
362- Toggle::make ('mail_on_threshold_failure ' )
363- ->label ('Notify on threshold failures ' )
364- ->columnSpanFull (),
365- ]),
366- Repeater::make ('mail_recipients ' )
367- ->label ('Recipients ' )
368- ->schema ([
369- Forms \Components \TextInput::make ('email_address ' )
370- ->
placeholder (
'[email protected] ' )
371- ->email ()
372- ->required (),
373- ])
374- ->columnSpanFull (),
375- Actions::make ([
376- Action::make ('test mail ' )
377- ->label ('Test mail channel ' )
378- ->action (fn (Forms \Get $ get ) => SendMailTestNotification::run (recipients: $ get ('mail_recipients ' )))
379- ->hidden (fn (Forms \Get $ get ) => ! count ($ get ('mail_recipients ' ))),
380- ]),
381- ]),
382- ])
383- ->compact ()
384- ->columns ([
385- 'default ' => 1 ,
386- 'md ' => 2 ,
387- ]),
388-
389438 Section::make ('Healthcheck.io ' )
439+ ->description ('⚠️ Healthcheck.io is deprecated and will be removed in a future release. ' )
390440 ->schema ([
391441 Toggle::make ('healthcheck_enabled ' )
392442 ->label ('Enable healthcheck.io webhook notifications ' )
@@ -432,6 +482,7 @@ public function form(Form $form): Form
432482 ]),
433483
434484 Section::make ('Telegram ' )
485+ ->description ('⚠️ Telegram is deprecated and will be removed in a future release. ' )
435486 ->schema ([
436487 Toggle::make ('telegram_enabled ' )
437488 ->label ('Enable telegram notifications ' )
@@ -480,50 +531,6 @@ public function form(Form $form): Form
480531 'default ' => 1 ,
481532 'md ' => 2 ,
482533 ]),
483-
484- Section::make ('Webhook ' )
485- ->schema ([
486- Toggle::make ('webhook_enabled ' )
487- ->label ('Enable webhook notifications ' )
488- ->reactive ()
489- ->columnSpanFull (),
490- Grid::make ([
491- 'default ' => 1 ,
492- ])
493- ->hidden (fn (Forms \Get $ get ) => $ get ('webhook_enabled ' ) !== true )
494- ->schema ([
495- Fieldset::make ('Triggers ' )
496- ->schema ([
497- Toggle::make ('webhook_on_speedtest_run ' )
498- ->label ('Notify on every speedtest run ' )
499- ->columnSpan (2 ),
500- Toggle::make ('webhook_on_threshold_failure ' )
501- ->label ('Notify on threshold failures ' )
502- ->columnSpan (2 ),
503- ]),
504- Repeater::make ('webhook_urls ' )
505- ->label ('Recipients ' )
506- ->schema ([
507- Forms \Components \TextInput::make ('url ' )
508- ->placeholder ('https://webhook.site/longstringofcharacters ' )
509- ->maxLength (2000 )
510- ->required ()
511- ->url (),
512- ])
513- ->columnSpanFull (),
514- Actions::make ([
515- Action::make ('test webhook ' )
516- ->label ('Test webhook channel ' )
517- ->action (fn (Forms \Get $ get ) => SendWebhookTestNotification::run (webhooks: $ get ('webhook_urls ' )))
518- ->hidden (fn (Forms \Get $ get ) => ! count ($ get ('webhook_urls ' ))),
519- ]),
520- ]),
521- ])
522- ->compact ()
523- ->columns ([
524- 'default ' => 1 ,
525- 'md ' => 2 ,
526- ]),
527534 ])
528535 ->columnSpan ([
529536 'md ' => 2 ,
0 commit comments