Skip to content

Commit 0e104db

Browse files
Chore: Add helpertext for notification triggers (alexjustesen#2640)
Co-authored-by: Alex Justesen <[email protected]>
1 parent f1480e4 commit 0e104db

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

app/Filament/Pages/Settings/Notification.php

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,11 @@ public function form(Schema $schema): Schema
8686
->columns(1)
8787
->schema([
8888
Checkbox::make('database_on_speedtest_run')
89-
->label(__('settings/notifications.notify_on_every_speedtest_run')),
90-
89+
->label(__('settings/notifications.notify_on_every_speedtest_run'))
90+
->helpertext(__('settings/notifications.notify_on_every_speedtest_run_helper')),
9191
Checkbox::make('database_on_threshold_failure')
92-
->label(__('settings/notifications.notify_on_threshold_failures')),
92+
->label(__('settings/notifications.notify_on_threshold_failures'))
93+
->helpertext(__('settings/notifications.notify_on_threshold_failures_helper')),
9394
]),
9495

9596
Actions::make([
@@ -118,10 +119,11 @@ public function form(Schema $schema): Schema
118119
->columns(1)
119120
->schema([
120121
Checkbox::make('mail_on_speedtest_run')
121-
->label(__('settings/notifications.notify_on_every_speedtest_run')),
122-
122+
->label(__('settings/notifications.notify_on_every_speedtest_run'))
123+
->helpertext(__('settings/notifications.notify_on_every_speedtest_run_helper')),
123124
Checkbox::make('mail_on_threshold_failure')
124-
->label(__('settings/notifications.notify_on_threshold_failures')),
125+
->label(__('settings/notifications.notify_on_threshold_failures'))
126+
->helpertext(__('settings/notifications.notify_on_threshold_failures_helper')),
125127
]),
126128

127129
Repeater::make('mail_recipients')
@@ -176,10 +178,11 @@ public function form(Schema $schema): Schema
176178
->columns(1)
177179
->schema([
178180
Checkbox::make('webhook_on_speedtest_run')
179-
->label(__('settings/notifications.notify_on_every_speedtest_run')),
180-
181+
->label(__('settings/notifications.notify_on_every_speedtest_run'))
182+
->helpertext(__('settings/notifications.notify_on_every_speedtest_run_helper')),
181183
Checkbox::make('webhook_on_threshold_failure')
182-
->label(__('settings/notifications.notify_on_threshold_failures')),
184+
->label(__('settings/notifications.notify_on_threshold_failures'))
185+
->helpertext(__('settings/notifications.notify_on_threshold_failures_helper')),
183186
]),
184187

185188
Repeater::make('webhook_urls')
@@ -250,9 +253,11 @@ public function form(Schema $schema): Schema
250253
->schema([
251254
Checkbox::make('apprise_on_speedtest_run')
252255
->label(__('settings/notifications.notify_on_every_speedtest_run'))
256+
->helpertext(__('settings/notifications.notify_on_every_speedtest_run_helper'))
253257
->columnSpanFull(),
254258
Checkbox::make('apprise_on_threshold_failure')
255259
->label(__('settings/notifications.notify_on_threshold_failures'))
260+
->helpertext(__('settings/notifications.notify_on_threshold_failures_helper'))
256261
->columnSpanFull(),
257262
]),
258263
Repeater::make('apprise_channel_urls')

lang/en/settings/notifications.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@
3636
'webhook_hint_description' => 'These are generic webhooks. For payload examples and implementation details, view the documentation. For services like Discord, Ntfy etc please use Apprise.',
3737

3838
// Common notification messages
39-
'notify_on_every_speedtest_run' => 'Notify on every scheduled speedtest run',
39+
'notify_on_every_speedtest_run' => 'Notify on every completed scheduled speedtest run',
40+
'notify_on_every_speedtest_run_helper' => 'This will send a notification for every completed scheduled speedtest run, only for healthy or unbenchmarked tests',
4041
'notify_on_threshold_failures' => 'Notify on threshold failures for scheduled speedtests',
42+
'notify_on_threshold_failures_helper' => 'This will send a notification when a scheduled speedtest fails any configured thresholds',
4143

4244
// Test notification messages
4345
'test_notifications' => [

0 commit comments

Comments
 (0)